From 01571ab2d796d136987c8759fe9b7347ea9a7720 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 28 May 2015 20:31:12 +0200 Subject: coq-mathcomp: refactor --- pkgs/development/coq-modules/mathcomp/generic.nix | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/development/coq-modules/mathcomp/generic.nix (limited to 'pkgs/development/coq-modules/mathcomp/generic.nix') diff --git a/pkgs/development/coq-modules/mathcomp/generic.nix b/pkgs/development/coq-modules/mathcomp/generic.nix new file mode 100644 index 000000000000..3748152b68a7 --- /dev/null +++ b/pkgs/development/coq-modules/mathcomp/generic.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, coq, ssreflect +, graphviz, ocamlPackages, withDoc ? true +, src +}: + +stdenv.mkDerivation { + + name = "coq-${coq.coq-version}-mathcomp-1.5"; + + inherit src; + + nativeBuildInputs = stdenv.lib.optionals withDoc + ([ graphviz ] ++ (with ocamlPackages; [ ocaml camlp5_transitional ])); + propagatedBuildInputs = [ ssreflect ]; + + enableParallelBuilding = true; + + buildFlags = stdenv.lib.optionalString withDoc "doc"; + + 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; { + homepage = http://ssr.msr-inria.inria.fr/; + license = licenses.cecill-b; + maintainers = [ maintainers.vbgl maintainers.jwiegley ]; + platforms = coq.meta.platforms; + }; + +} -- cgit 1.4.1