forked from digitallyinduced/ihp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
65 lines (57 loc) · 2.92 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ 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 {});
in
if pkgs.lib.inNixShell then drv.env else drv