-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
49 lines (45 loc) · 1.04 KB
/
default.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
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc802" }:
let
inherit (nixpkgs) pkgs;
ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages (ps: with ps; [
shake
turtle
hxt
hxt-xpath
hxt-xslt
hxt-relaxng
hxt-expat
naqsha
safe
aeson
yaml
warp
wai-app-static
optparse-applicative
]);
bowerComponents = pkgs.buildBowerComponents {
name = "frontend";
generated = ./frontend/bower-packages.nix;
src = builtins.filterSource (name: path: baseNameOf (toString name) == "bower.json") ./frontend;
};
buildTools = with pkgs; [
gpsbabel
xmlstarlet
sassc
closurecompiler
zopfli
];
in
pkgs.stdenv.mkDerivation {
name = "my-haskell-env-0";
buildInputs = [ ghc ] ++ buildTools;
shellHook = ''
eval $(egrep ^export ${ghc}/bin/ghc)
export BOWER_COMPONENTS=${bowerComponents}
'';
passthru = {
frontend = import ./frontend.nix {
inherit nixpkgs;
};
};
}