1{ stdenv, fetchurl, coq
2, graphviz, withDoc ? true
3, src, patches ? []
4}:
5
6stdenv.mkDerivation {
7
8 name = "coq-ssreflect-1.5-${coq.coq-version}";
9
10 inherit src;
11
12 nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
13 buildInputs = [ coq.ocaml coq.camlp5 ];
14 propagatedBuildInputs = [ coq ];
15
16 enableParallelBuilding = true;
17
18 inherit patches;
19
20 postPatch = ''
21 # Permit building of the ssrcoq statically-bound executable
22 sed -i 's/^#-custom/-custom/' Make
23 sed -i 's/^#SSRCOQ/SSRCOQ/' Make
24 '';
25
26 buildFlags = stdenv.lib.optionalString withDoc "doc";
27
28 installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
29
30 postInstall = ''
31 mkdir -p $out/bin
32 cp -p bin/ssrcoq $out/bin
33 cp -p bin/ssrcoq.byte $out/bin
34 '' + stdenv.lib.optionalString withDoc ''
35 mkdir -p $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/
36 cp -r html $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/
37 '';
38
39 meta = with stdenv.lib; {
40 homepage = http://ssr.msr-inria.inria.fr/;
41 license = licenses.cecill-b;
42 maintainers = with maintainers; [ vbgl jwiegley ];
43 platforms = coq.meta.platforms;
44 };
45
46}