coq-mathcomp: refactor
This commit is contained in:
parent
524b7fe178
commit
01571ab2d7
@ -1,26 +0,0 @@
|
||||
{stdenv, fetchurl, coq, ssreflect}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "coq-mathcomp-1.5-8.5b2";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.5.coq85beta2.tar.gz;
|
||||
sha256 = "03bnq44ym43x8shi7whc02l0g5vy6rx8f1imjw478chlgwcxazqy";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ coq ssreflect ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installFlags = "COQLIB=$(out)/lib/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;
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
|
||||
}
|
@ -1,35 +1,24 @@
|
||||
{ stdenv, fetchurl, coq, ssreflect
|
||||
, graphviz, ocaml, withDoc ? true
|
||||
}:
|
||||
{ callPackage, coq, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let src =
|
||||
if coq.coq-version == "8.4" then
|
||||
|
||||
name = "coq-mathcomp-1.5";
|
||||
fetchurl {
|
||||
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.5.tar.gz;
|
||||
sha256 = "1297svwi18blrlyd8vsqilar2h5nfixlvlifdkbx47aljq4m5bam";
|
||||
}
|
||||
|
||||
src = fetchurl {
|
||||
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.5.tar.gz;
|
||||
sha256 = "1297svwi18blrlyd8vsqilar2h5nfixlvlifdkbx47aljq4m5bam";
|
||||
};
|
||||
else if coq.coq-version == "8.5" then
|
||||
|
||||
nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ocaml ];
|
||||
propagatedBuildInputs = [ coq ssreflect ];
|
||||
fetchurl {
|
||||
url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.5.coq85beta2.tar.gz;
|
||||
sha256 = "03bnq44ym43x8shi7whc02l0g5vy6rx8f1imjw478chlgwcxazqy";
|
||||
}
|
||||
|
||||
enableParallelBuilding = true;
|
||||
else throw "No mathcomp package for Coq version ${coq.coq-version}";
|
||||
|
||||
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;
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
in
|
||||
|
||||
callPackage ./generic.nix {
|
||||
inherit src;
|
||||
}
|
||||
|
33
pkgs/development/coq-modules/mathcomp/generic.nix
Normal file
33
pkgs/development/coq-modules/mathcomp/generic.nix
Normal file
@ -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;
|
||||
};
|
||||
|
||||
}
|
@ -14048,6 +14048,8 @@ let
|
||||
|
||||
mkCoqPackages_8_4 = self: let callPackage = newScope self; in {
|
||||
|
||||
inherit callPackage;
|
||||
|
||||
bedrock = callPackage ../development/coq-modules/bedrock {};
|
||||
|
||||
contribs =
|
||||
@ -14094,7 +14096,7 @@ let
|
||||
|
||||
coq = coq_8_5;
|
||||
|
||||
mathcomp = callPackage ../development/coq-modules/mathcomp/1.5.nix { };
|
||||
mathcomp = callPackage ../development/coq-modules/mathcomp { };
|
||||
|
||||
ssreflect = callPackage ../development/coq-modules/ssreflect { };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user