3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/coq-modules/ssreflect/default.nix

33 lines
908 B
Nix
Raw Normal View History

{ stdenv, coq, ncurses, which
, graphviz, mathcomp, withDoc ? false
2018-11-04 07:07:46 +00:00
}:
stdenv.mkDerivation rec {
name = "coq${coq.coq-version}-ssreflect-${version}";
2018-04-24 15:21:21 +01:00
inherit (mathcomp) src version meta;
2018-11-04 07:07:46 +00:00
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
buildInputs = [ coq ncurses which ] ++ (with coq.ocamlPackages; [ ocaml findlib camlp5 ]);
enableParallelBuilding = true;
COQBIN = "${coq}/bin/";
2018-11-04 07:07:46 +00:00
preBuild = ''
patchShebangs etc/utils/ssrcoqdep || true
cd mathcomp/ssreflect
'';
installPhase = ''
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
'';
postInstall = stdenv.lib.optionalString withDoc ''
mkdir -p $out/share/doc/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect/
cp -r html $out/share/doc/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect/
'';
passthru.compatibleCoqVersions = mathcomp.compatibleCoqVersions;
}