coq-mathcomp: also build and install the documentation

This commit is contained in:
Vincent Laporte 2015-05-28 14:11:58 +02:00
parent e6b29c024b
commit 0f6b981fba
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,6 @@
{stdenv, fetchurl, coq, ssreflect}: { stdenv, fetchurl, coq, ssreflect
, graphviz, ocaml, withDoc ? true
}:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -9,12 +11,19 @@ stdenv.mkDerivation {
sha256 = "1297svwi18blrlyd8vsqilar2h5nfixlvlifdkbx47aljq4m5bam"; sha256 = "1297svwi18blrlyd8vsqilar2h5nfixlvlifdkbx47aljq4m5bam";
}; };
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ocaml ];
propagatedBuildInputs = [ coq ssreflect ]; propagatedBuildInputs = [ coq ssreflect ];
enableParallelBuilding = true; enableParallelBuilding = true;
buildFlags = stdenv.lib.optionalString withDoc "doc";
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
postInstall = stdenv.lib.optionalString withDoc ''
make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://ssr.msr-inria.inria.fr/; homepage = http://ssr.msr-inria.inria.fr/;
license = licenses.cecill-b; license = licenses.cecill-b;