forked from mit-plv/koika
-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
67 lines (58 loc) · 1.13 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
{
lib,
mkCoqDerivation,
coq,
boost,
python3,
sphinx,
doCheck ? false,
}:
mkCoqDerivation rec {
pname = "koika";
defaultVersion = "0.0.1";
opam-name = "koika";
useDune = true;
release."0.0.1" = {
src = lib.const (lib.cleanSourceWith {
src = lib.cleanSource ./.;
filter = let
inherit (lib) all hasSuffix;
ignorePaths = xs: path: all (x: ! hasSuffix x path) xs;
in
path: _: ignorePaths (import ./ignored_paths.nix) path;
});
};
enableParallelBuilding = true;
nativeBuildInputs = [
python3
sphinx
];
buildInputs = [
boost
];
propagatedBuildInputs = with coq.ocamlPackages; [
findlib
base
core
core_unix
stdio
parsexp
hashcons
zarith
];
preInstall = ''
dune build README.html
mkdir -p $out/doc/koika
cp README.html $out/doc/koika/
'';
inherit doCheck;
checkPhase = ''
runHook preCheck
./coq.kernel.hack.sh
dune build --always-show-command-line --no-config --profile release @runtest
runHook postCheck
'';
shellHook = ''
[ -x coq.kernel.hack.sh ] && ./coq.kernel.hack.sh
'';
}