2019-06-16 12:59:06 -07:00
|
|
|
{ stdenv, coq, ncurses, which
|
2018-11-06 07:00:45 -08:00
|
|
|
, graphviz, mathcomp, withDoc ? false
|
2018-11-04 00:07:46 -07:00
|
|
|
}:
|
2014-09-28 04:43:48 -07:00
|
|
|
|
2018-11-06 07:00:45 -08:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "coq${coq.coq-version}-ssreflect-${version}";
|
2018-04-24 07:21:21 -07:00
|
|
|
|
2018-11-06 07:00:45 -08:00
|
|
|
inherit (mathcomp) src version meta;
|
2018-11-04 00:07:46 -07:00
|
|
|
|
|
|
|
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
|
|
|
|
buildInputs = [ coq ncurses which ] ++ (with coq.ocamlPackages; [ ocaml findlib camlp5 ]);
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-11-06 07:00:45 -08:00
|
|
|
COQBIN = "${coq}/bin/";
|
|
|
|
|
2018-11-04 00:07:46 -07: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/
|
|
|
|
'';
|
|
|
|
|
2018-11-06 07:00:45 -08:00
|
|
|
passthru.compatibleCoqVersions = mathcomp.compatibleCoqVersions;
|
2016-12-22 10:34:56 -08:00
|
|
|
}
|