-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
35 lines (34 loc) · 861 Bytes
/
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
with import (builtins.fetchTarball {
url = https://github.com/nixos/nixpkgs/archive/1085c056376041af71e8f1cf72c1ed4a4db01dc6.tar.gz;
sha256 = "17sh68825jhjfpn1q02ni8xifrgaszz494irx096f0mmi2k2lkqp";
}) {};
stdenv.mkDerivation rec {
name = "PolyGen";
doCheck = true;
src = nix-gitignore.gitignoreSource [] ./.;
buildInputs = (with pkgs.ocaml-ng.ocamlPackages_4_07; [
ocaml
findlib
menhir
zarith
glpk
]) ++ [ coq_8_7 coq2html ];
buildPhase = ''
make vplsetup
make
make extract
make ocaml
make documentation
'';
checkPhase = ''
ocaml/test
'';
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/doc"
cp ocaml/test "$out/bin/test"
cp doc/index.html "$out/doc/index.html"
cp -r doc/html "$out/doc/html"
'';
forceShare = [ "man" "info" ]; # Do not move doc/ to share/doc/
}