nixpkgs/pkgs/development/coq-modules/mathcomp/generic.nix

39 lines
942 B
Nix
Raw Normal View History

{ stdenv, fetchurl, coq, ncurses, which
, graphviz, withDoc ? false
, src, name
2015-05-28 19:31:12 +01:00
}:
stdenv.mkDerivation {
inherit name;
2015-05-28 19:31:12 +01:00
inherit src;
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
propagatedBuildInputs = [ coq ];
2015-05-28 19:31:12 +01:00
enableParallelBuilding = true;
buildFlags = stdenv.lib.optionalString withDoc "doc";
preBuild = ''
2016-01-04 21:12:28 +00:00
patchShebangs etc/utils/ssrcoqdep
cd mathcomp
export COQBIN=${coq}/bin/
'';
2015-05-28 19:31:12 +01:00
installPhase = ''
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
'' + stdenv.lib.optionalString withDoc ''
2015-05-28 19:31:12 +01: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;
};
}