forked from BarrelfishOS/barrelfish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
80 lines (72 loc) · 1.24 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ stdenv, fetchgit, haskell, pythonPackages
, autoconf
, automake
, binutils
, coreutils
, cpio
, curl
, gcc5
, gdb
, git
, gmp
, gnugrep
, gnused
, m4
, qemu
, ghc-version ? "ghc801"
, propagate-deps ? false
, use-repo-source ? false
, repo-url ? ""
, repo-commit-id ? ""
, repo-commit-sha256 ? ""
}:
let src-repo = fetchgit {
url = repo-url;
rev = repo-commit-id;
sha256 = repo-commit-sha256;
};
ghc = haskell.packages."${ghc-version}".ghcWithPackages
(haskellPackages: with haskellPackages; [
async
bytestring-trie
ghc-paths
ghc-mtl
haskell-src-exts
parsec
random
]);
deps = [
autoconf
automake
binutils
coreutils
cpio
curl
gcc5
gdb
git
gmp
gnugrep
gnused
m4
qemu
pythonPackages.pexpect
# custom GHC
ghc
];
in
stdenv.mkDerivation {
version = "2016-11-09";
name = "barrelfish";
src = if use-repo-source
then src-repo
else builtins.filterSource
(path: type: baseNameOf path != ".git" && baseNameOf path != "build")
./.;
buildInputs = deps;
propagatedBuildInputs = if propagate-deps
then deps
else [];
description = "The Barrelfish OS";
license = "MIT";
}