From e6b29c024be556362552b6879534e4d372bd8dfd Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 28 May 2015 14:10:39 +0200 Subject: [PATCH] coq-ssreflect: also build and install the documentation --- pkgs/development/coq-modules/ssreflect/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/coq-modules/ssreflect/default.nix b/pkgs/development/coq-modules/ssreflect/default.nix index 75112ec96639..bb91c3e270b6 100644 --- a/pkgs/development/coq-modules/ssreflect/default.nix +++ b/pkgs/development/coq-modules/ssreflect/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl, coq}: +{ stdenv, fetchurl, coq +, graphviz, withDoc ? true +}: assert coq.coq-version == "8.4"; @@ -11,6 +13,7 @@ stdenv.mkDerivation { sha256 = "0hm1ha7sxqfqhc7iwhx6zdz3nki4rj5nfd3ab24hmz8v7mlpinds"; }; + nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ]; buildInputs = [ coq.ocaml coq.camlp5 ]; propagatedBuildInputs = [ coq ]; @@ -22,12 +25,17 @@ stdenv.mkDerivation { sed -i 's/^#SSRCOQ/SSRCOQ/' Make ''; + buildFlags = stdenv.lib.optionalString withDoc "doc"; + installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; postInstall = '' mkdir -p $out/bin cp -p bin/ssrcoq $out/bin cp -p bin/ssrcoq.byte $out/bin + '' + stdenv.lib.optionalString withDoc '' + mkdir -p $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/ + cp -r html $out/share/doc/coq/${coq.coq-version}/user-contrib/Ssreflect/ ''; meta = with stdenv.lib; {