-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathdefault.nix
More file actions
69 lines (66 loc) · 2.43 KB
/
default.nix
File metadata and controls
69 lines (66 loc) · 2.43 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# CI job to test that we don't break the subcomponent structure of the stdlib,
# as described in the graph doc/stdlib/depends.dot
{ rocq-core, stdlib, rocqPackages }:
let
# stdlib subcomponents with their dependencies
# when editing this, ensure to keep doc/stdlib/depends.dot in sync
components = {
"corelib-wrapper" = [ ];
"logic" = [ ];
"relations" = [ "corelib-wrapper" ];
"program" = [ "corelib-wrapper" "logic" ];
"classes" = [ "program" "relations" ];
"bool" = [ "classes" ];
"structures" = [ "bool" ];
"arith-base" = [ "structures" ];
"positive" = [ "arith-base" ];
"narith" = [ "ring" ];
"zarith-base" = [ "narith-base" ];
"narith-base" = [ "positive" ];
"lists" = [ "arith-base" ];
"ring" = [ "zarith-base" "lists" ];
"arith" = [ "ring" ];
"strings" = [ "arith" ];
"lia" = [ "arith" "narith" ];
"zarith" = [ "lia" ];
"zmod" = [ "zarith" "sorting" "field" ];
"qarith-base" = [ "ring" ];
"field" = [ "zarith" ];
"lqa" = [ "field" "qarith-base" ];
"qarith" = [ "lqa" ];
"classical-logic" = [ "arith" ];
"sets" = [ "classical-logic" ];
"vectors" = [ "lists" ];
"sorting" = [ "lia" "sets" "vectors" ];
"orders-ex" = [ "strings" "sorting" ];
"unicode" = [ ];
"primitive-int" = [ "unicode" "zarith" ];
"primitive-floats" = [ "primitive-int" ];
"primitive-array" = [ "primitive-int" ];
"primitive-string" = [ "primitive-int" "orders-ex" ];
"reals" = [ "qarith" "classical-logic" "vectors" ];
"fmaps-fsets-msets" = [ "orders-ex" "zarith" ];
"extraction" = [ "primitive-string" "primitive-array" "primitive-floats" ];
"funind" = [ "arith-base" ];
"wellfounded" = [ "lists" ];
"streams" = [ "logic" ];
"rtauto" = [ "positive" "lists" ];
"compat" = [ "rtauto" "fmaps-fsets-msets" "funind" "extraction" "reals" "zmod" "wellfounded" "streams" ];
"all" = [ "compat" ];
};
stdlib_ = component: let
pname = "stdlib-${component}";
stdlib-deps = map stdlib_ components.${component};
in rocqPackages.lib.overrideRocqDerivation ({
inherit pname;
propagatedBuildInputs = stdlib-deps;
mlPlugin = true;
} // {
buildPhase = ''
make ''${enableParallelBuilding:+-j $NIX_BUILD_CORES} build-${component}
'';
installPhase = ''
make COQLIBINSTALL=$out/lib/coq/${rocq-core.rocq-version}/user-contrib install-${component}
'';
}) stdlib;
in stdlib_ "all"