-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
57 lines (50 loc) · 1.75 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
50
51
52
53
54
55
56
57
{ nixpkgsRaw ? (import ./nix/pkgs.nix).pkgs
, compiler ? "ghc90"
}:
let
nixpkgs =
nixpkgsRaw //
{ haskellPackages =
nixpkgsRaw.haskellPackages.override {
overrides = self: super: {
statistics = self.haskell.lib.dontCheck super.statistics;
};
};
};
bellman-ford =
let src = builtins.fetchGit {
url = "https://github.com/runeksvendsen/bellman-ford.git";
rev = "ef7c86f36b13d109f58b70946e023fa83502dec8";
};
in import src { inherit nixpkgs compiler; };
dump-decls-lib =
let src = builtins.fetchGit {
url = "https://github.com/runeksvendsen/dump-decls.git";
rev = "496fc63c1279aedcdf7143c5ea85970e63a2ba0a";
};
in import (src + "/dump-decls-lib") { inherit nixpkgs compiler; };
servant-errors =
let src = builtins.fetchGit {
url = "https://github.com/epicallan/servant-errors.git";
rev = "7c564dff3574c35cae721b711bd90503b851438e";
};
in nixpkgs.pkgs.haskell.packages.${compiler}.callCabal2nix "servant-errors" src {};
args =
{ bellman-ford = bellman-ford;
dump-decls-lib = dump-decls-lib;
servant-errors = servant-errors;
};
# TODO: run 'test-web' executable as part of build and fail build on non-zero exit code
function-graph = nixpkgs.pkgs.haskell.lib.doBenchmark (
nixpkgs.pkgs.haskell.packages.${compiler}.callCabal2nix "function-graph" ./. args
);
function-graph-server-wrapped = nixpkgs.runCommand "server-wrapped" {
buildInputs = [ nixpkgs.makeWrapper ];
}
''
mkdir -p $out/bin
makeWrapper ${function-graph}/bin/server $out/bin/server-wrapped \
--set PATH ${nixpkgs.lib.makeBinPath [ nixpkgs.graphviz ]}
'';
in
function-graph-server-wrapped