Adding mathcomp-analysis single
This commit is contained in:
parent
010f1b2138
commit
c8aa298134
|
@ -1,7 +1,8 @@
|
||||||
{ lib,
|
{ lib,
|
||||||
mkCoqDerivation, recurseIntoAttrs,
|
mkCoqDerivation, recurseIntoAttrs,
|
||||||
mathcomp, mathcomp-finmap, mathcomp-bigenough, mathcomp-real-closed,
|
mathcomp, mathcomp-finmap, mathcomp-bigenough,
|
||||||
hierarchy-builder,
|
hierarchy-builder,
|
||||||
|
single ? false,
|
||||||
coqPackages, coq, version ? null }@args:
|
coqPackages, coq, version ? null }@args:
|
||||||
with builtins // lib;
|
with builtins // lib;
|
||||||
let
|
let
|
||||||
|
@ -36,20 +37,23 @@ let
|
||||||
packages = [ "classical" "analysis" ];
|
packages = [ "classical" "analysis" ];
|
||||||
|
|
||||||
mathcomp_ = package: let
|
mathcomp_ = package: let
|
||||||
analysis-deps = map mathcomp_ (head (splitList (pred.equal package) packages));
|
classical-deps = [ mathcomp.algebra mathcomp-finmap hierarchy-builder ];
|
||||||
pkgpath = if package == "analysis" then "theories" else "${package}";
|
analysis-deps = [ mathcomp.field mathcomp-bigenough ];
|
||||||
pname = "mathcomp-${package}";
|
intra-deps = if package == "single" then []
|
||||||
|
else map mathcomp_ (head (splitList (pred.equal package) packages));
|
||||||
|
pkgpath = if package == "single" then "."
|
||||||
|
else if package == "analysis" then "theories" else "${package}";
|
||||||
|
pname = if package == "single" then "mathcomp-analysis-single"
|
||||||
|
else "mathcomp-${package}";
|
||||||
derivation = mkCoqDerivation ({
|
derivation = mkCoqDerivation ({
|
||||||
inherit version pname defaultVersion release repo owner;
|
inherit version pname defaultVersion release repo owner;
|
||||||
|
|
||||||
namePrefix = [ "coq" "mathcomp" ];
|
namePrefix = [ "coq" "mathcomp" ];
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
(if package == "classical" then
|
intra-deps
|
||||||
[ mathcomp.ssreflect mathcomp.algebra mathcomp-finmap ]
|
++ optionals (elem package [ "classical" "single" ]) classical-deps
|
||||||
else
|
++ optionals (elem package [ "analysis" "single" ]) analysis-deps;
|
||||||
[ mathcomp.field mathcomp-bigenough mathcomp-real-closed ])
|
|
||||||
++ [ analysis-deps ];
|
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
cd ${pkgpath}
|
cd ${pkgpath}
|
||||||
|
@ -83,4 +87,4 @@ let
|
||||||
);
|
);
|
||||||
in patched-derivation;
|
in patched-derivation;
|
||||||
in
|
in
|
||||||
mathcomp_ "analysis"
|
mathcomp_ (if single then "single" else "analysis")
|
||||||
|
|
Loading…
Reference in a new issue