2015-12-20 19:12:23 +00:00
|
|
|
{ stdenv, fetchurl, coq, ncurses, which
|
|
|
|
, graphviz, withDoc ? false
|
2016-12-22 18:34:56 +00:00
|
|
|
, src, name, patches ? []
|
2015-05-28 14:09:05 +00:00
|
|
|
}:
|
2015-04-24 16:51:05 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2016-12-22 18:34:56 +00:00
|
|
|
inherit name;
|
2015-05-28 14:09:05 +00:00
|
|
|
inherit src;
|
2015-04-24 16:51:05 +00:00
|
|
|
|
2015-05-28 14:09:05 +00:00
|
|
|
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
|
2017-01-25 07:41:25 +00:00
|
|
|
buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
|
2015-04-24 16:51:05 +00:00
|
|
|
propagatedBuildInputs = [ coq ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-05-28 14:09:05 +00:00
|
|
|
inherit patches;
|
2015-04-24 16:51:05 +00:00
|
|
|
|
2015-12-20 19:12:23 +00:00
|
|
|
preBuild = ''
|
2016-01-04 21:12:28 +00:00
|
|
|
patchShebangs etc/utils/ssrcoqdep
|
2015-12-20 19:12:23 +00:00
|
|
|
cd mathcomp/ssreflect
|
|
|
|
export COQBIN=${coq}/bin/
|
2015-04-24 16:51:05 +00:00
|
|
|
'';
|
|
|
|
|
2015-12-20 19:12:23 +00:00
|
|
|
installPhase = ''
|
|
|
|
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
|
|
|
|
'';
|
2015-04-24 16:51:05 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2015-12-20 19:12:23 +00:00
|
|
|
# mkdir -p $out/bin
|
|
|
|
# cp -p bin/ssrcoq $out/bin
|
|
|
|
# cp -p bin/ssrcoq.byte $out/bin
|
2015-05-28 14:09:05 +00:00
|
|
|
'' + stdenv.lib.optionalString withDoc ''
|
2015-12-20 19:12:23 +00:00
|
|
|
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/
|
2015-04-24 16:51:05 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://ssr.msr-inria.inria.fr/;
|
|
|
|
license = licenses.cecill-b;
|
|
|
|
maintainers = with maintainers; [ vbgl jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
2018-03-21 14:00:47 +00:00
|
|
|
passthru = {
|
|
|
|
compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" ];
|
|
|
|
};
|
|
|
|
|
2015-04-24 16:51:05 +00:00
|
|
|
}
|