2015-12-20 20:12:23 +01:00
|
|
|
{ stdenv, fetchurl, coq, ssreflect, ncurses, which
|
|
|
|
, graphviz, ocamlPackages, withDoc ? false
|
2015-05-28 20:31:12 +02:00
|
|
|
, src
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
2015-12-20 20:12:23 +01:00
|
|
|
name = "coq-mathcomp-1.6-${coq.coq-version}";
|
2015-05-28 20:31:12 +02:00
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2015-12-20 20:12:23 +01:00
|
|
|
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
|
|
|
|
buildInputs = [ coq.ocaml coq.camlp5 ncurses which ];
|
|
|
|
propagatedBuildInputs = [ coq ssreflect ];
|
2015-05-28 20:31:12 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
buildFlags = stdenv.lib.optionalString withDoc "doc";
|
|
|
|
|
2015-12-20 20:12:23 +01:00
|
|
|
preBuild = ''
|
2016-01-04 22:12:28 +01:00
|
|
|
patchShebangs etc/utils/ssrcoqdep
|
2015-12-20 20:12:23 +01:00
|
|
|
cd mathcomp
|
|
|
|
export COQBIN=${coq}/bin/
|
|
|
|
'';
|
2015-05-28 20:31:12 +02:00
|
|
|
|
2015-12-20 20:12:23 +01:00
|
|
|
installPhase = ''
|
|
|
|
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
|
|
|
|
rm -fr $out/lib/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect*
|
|
|
|
rm -fr $out/lib/coq/${coq.coq-version}/user-contrib/ssrmatching.cmi
|
|
|
|
rm -fr $out/share/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect*
|
|
|
|
'' + stdenv.lib.optionalString withDoc ''
|
2015-05-28 20:31:12 +02:00
|
|
|
make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://ssr.msr-inria.inria.fr/;
|
|
|
|
license = licenses.cecill-b;
|
|
|
|
maintainers = [ maintainers.vbgl maintainers.jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|