-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.nix
More file actions
50 lines (49 loc) · 1.1 KB
/
default.nix
File metadata and controls
50 lines (49 loc) · 1.1 KB
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
{lib, stdenv, which, fstar, z3, ocamlPackages}:
let
comparse = stdenv.mkDerivation {
name = "comparse";
# TODO: exclude tests
src =
lib.sources.sourceByRegex ./. [
"Makefile"
"src(/.*)?"
]
;
buildInputs = [ which fstar z3 ];
installPhase = ''
mkdir -p $out
cp -r ml src cache hints $out
'';
passthru.tests = comparse-tests;
};
comparse-tests = stdenv.mkDerivation {
name = "comparse-tests";
src =
lib.sources.sourceByRegex ./. [
"Makefile"
"src(/.*)?"
"dune-project"
"ml(/lib(/dune)?)?"
"ml(/tests(/dune)?)?"
"comparse.opam"
]
;
buildInputs =
[ which fstar z3 ]
++ (with ocamlPackages; [
ocaml dune_3 findlib
])
++ (fstar.buildInputs);
# pre-patch uses build output from comparse, to avoid building things twice
prePatch = ''
cp -pr --no-preserve=mode ${comparse}/cache ${comparse}/ml .
mkdir obj
cp -p ml/lib/src/* obj/
'';
doCheck = true;
installPhase = ''
touch $out
'';
};
in
comparse