-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved NixSupport/shell.nix to the IHP root shell.nix
- Loading branch information
1 parent
6643a08
commit 5044d71
Showing
6 changed files
with
63 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,60 @@ | ||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: | ||
|
||
let | ||
|
||
inherit (nixpkgs) pkgs; | ||
|
||
f = { mkDerivation, aeson, async, attoparsec, base, basic-prelude | ||
, blaze-html, blaze-markup, bytestring, case-insensitive | ||
, classy-prelude, clientsession, containers, cookie | ||
, countable-inflections, data-default, directory, fsnotify | ||
, ghc-prim, haskell-src-exts, haskell-src-meta, http-client | ||
, http-media, http-types, inflections, interpolate, megaparsec, mtl | ||
, network, network-uri, newtype-generics, postgresql-simple | ||
, process, pwstore-fast, random-strings, split, stdenv | ||
, string-conversions, template-haskell, text, time, typerep-map | ||
, unix, unliftio, uuid, vault, wai, wai-extra | ||
, wai-middleware-static, wai-session, wai-session-clientsession | ||
, wai-util, wai-websockets, warp, websockets | ||
}: | ||
mkDerivation { | ||
pname = "ihp"; | ||
version = "0.1.0.0"; | ||
src = ./.; | ||
isLibrary = false; | ||
isExecutable = true; | ||
libraryHaskellDepends = [ | ||
aeson async attoparsec base basic-prelude blaze-html blaze-markup | ||
bytestring case-insensitive classy-prelude clientsession containers | ||
cookie countable-inflections data-default directory ghc-prim | ||
haskell-src-exts haskell-src-meta http-client http-media http-types | ||
inflections interpolate megaparsec mtl network-uri newtype-generics | ||
postgresql-simple process pwstore-fast random-strings split | ||
string-conversions template-haskell text time typerep-map uuid | ||
vault wai wai-extra wai-middleware-static wai-session | ||
wai-session-clientsession wai-util warp | ||
]; | ||
executableHaskellDepends = [ | ||
aeson async attoparsec base basic-prelude blaze-html blaze-markup | ||
bytestring case-insensitive classy-prelude clientsession containers | ||
cookie countable-inflections data-default directory fsnotify | ||
ghc-prim haskell-src-exts haskell-src-meta http-client http-media | ||
http-types inflections interpolate megaparsec mtl network | ||
network-uri newtype-generics postgresql-simple process | ||
pwstore-fast random-strings split string-conversions | ||
template-haskell text time typerep-map unix unliftio uuid vault wai | ||
wai-extra wai-middleware-static wai-session | ||
wai-session-clientsession wai-util wai-websockets warp websockets | ||
]; | ||
doHaddock = false; | ||
description = "Haskell Web Framework"; | ||
license = stdenv.lib.licenses.unfree; | ||
hydraPlatforms = stdenv.lib.platforms.none; | ||
}; | ||
|
||
haskellPackages = if compiler == "default" | ||
then pkgs.haskellPackages | ||
else pkgs.haskell.packages.${compiler}; | ||
|
||
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | ||
|
||
drv = variant (haskellPackages.callPackage f {}); | ||
|
||
pkgs = import ./NixSupport/pkgs.nix; | ||
ghc = pkgs.haskell.packages.ghc883; | ||
haskellDeps = ghc.ghcWithPackages (p: with p; [ | ||
cabal-install | ||
base | ||
classy-prelude | ||
directory | ||
string-conversions | ||
warp | ||
wai | ||
mtl | ||
blaze-html | ||
blaze-markup | ||
wai-extra | ||
http-types | ||
inflections | ||
text | ||
postgresql-simple | ||
wai-middleware-static | ||
wai-util | ||
http-client | ||
aeson | ||
uuid | ||
wai-session | ||
wai-session-clientsession | ||
clientsession | ||
pwstore-fast | ||
template-haskell | ||
haskell-src-meta | ||
random-strings | ||
interpolate | ||
uri-encode | ||
websockets | ||
wai-websockets | ||
mime-mail | ||
mime-mail-ses | ||
attoparsec | ||
case-insensitive | ||
http-media | ||
cookie | ||
process | ||
newtype-generics | ||
unix | ||
fsnotify | ||
countable-inflections | ||
typerep-map | ||
mmark-cli | ||
data-default | ||
hspec | ||
regex-tdfa | ||
resource-pool | ||
]); | ||
in | ||
|
||
if pkgs.lib.inNixShell then drv.env else drv | ||
pkgs.stdenv.mkDerivation { | ||
name = "app"; | ||
src = ./../.; | ||
buildInputs = [haskellDeps pkgs.entr]; | ||
shellHook = "eval $(egrep ^export ${haskellDeps}/bin/ghc)"; | ||
} |