1{ stdenv, fetchurl, coq, ncurses, which
2, graphviz, withDoc ? false
3, src, name
4}:
5
6stdenv.mkDerivation {
7
8 inherit name;
9 inherit src;
10
11 nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
12 buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
13 propagatedBuildInputs = [ coq ];
14
15 enableParallelBuilding = true;
16
17 buildFlags = stdenv.lib.optionalString withDoc "doc";
18
19 preBuild = ''
20 patchShebangs etc/utils/ssrcoqdep
21 cd mathcomp
22 export COQBIN=${coq}/bin/
23 '';
24
25 installPhase = ''
26 make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
27 '' + stdenv.lib.optionalString withDoc ''
28 make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/
29 '';
30
31 meta = with stdenv.lib; {
32 homepage = http://ssr.msr-inria.inria.fr/;
33 license = licenses.cecill-b;
34 maintainers = [ maintainers.vbgl maintainers.jwiegley ];
35 platforms = coq.meta.platforms;
36 };
37
38}