@@ -1,7 +1,7 @@
1−{ stdenv, fetchFromGitHub, coq, mathcomp, coqPackages,
1+{ stdenv, fetchFromGitHub, coq, ssreflect, coqPackages,
22 recurseIntoAttrs }:
33with builtins // stdenv.lib;
4−let current-mathcomp = mathcomp; in
4+let current-ssreflect = ssreflect; in
55let
66# configuring packages
77param = {
@@ -20,6 +20,7 @@ param = {
2020 };
2121 multinomials = {
2222 version-sha256 = {
23+ "1.3" = "0l3vi5n094nx3qmy66hsv867fnqm196r8v605kpk24gl0aa57wh4";
2324 "1.2" = "1mh1w339dslgv4f810xr1b8v2w7rpx6fgk9pz96q0fyq49fw2xcq";
2425 "1.1" = "1q8alsm89wkc0lhcvxlyn0pd8rbl2nnxg81zyrabpz610qqjqc3s";
2526 "1.0" = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
@@ -32,7 +33,9 @@ param = {
3233 "0.2.0" = "1186xjxgns4ns1szyi931964bjm0mp126qzlv10mkqqgfw07nhrd";
3334 "0.1.0" = "0hwkr2wzy710pcyh274fcarzdx8sv8myp16pv0vq5978nmih46al";
3435 };
36+ compatibleCoqVersions = flip elem ["8.8" "8.9"];
3537 description = "Analysis library compatible with Mathematical Components";
38+ license = stdenv.lib.licenses.cecill-c;
3639 };
3740 real-closed = {
3841 version-sha256 = {
@@ -42,6 +45,15 @@ param = {
4245 };
4346 description = "Mathematical Components Library on real closed fields";
4447 };
48+ coqeal = {
49+ version-sha256 = {
50+ "1.0.0" = "1had6f1n85lmh9x31avbmgl3m0rsiw9f8ma95qzk5b57fjg5k1ii";
51+ };
52+ description = "CoqEAL - The Coq Effective Algebra Library";
53+ owner = "CoqEAL";
54+ compatibleCoqVersions = flip elem ["8.7" "8.8" "8.9"];
55+ license = stdenv.lib.licenses.mit;
56+ };
4557};
4658versions = {
4759 "1.9.0" = {
@@ -49,13 +61,17 @@ versions = {
4961 bigenough.version = "1.0.0";
5062 analysis = {
5163 version = "0.2.2";
52− core-deps = with coqPackages; [ mathcomp_1_9-field ];
64+ core-deps = with coqPackages; [ mathcomp-field_1_9 ];
65+ extra-deps = with coqPackages; [ mathcomp_1_9-finmap mathcomp_1_9-bigenough ];
66+ };
67+ multinomials = {
68+ version = "1.3";
69+ core-deps = with coqPackages; [ mathcomp-algebra_1_9 ];
5370 extra-deps = with coqPackages; [ mathcomp_1_9-finmap mathcomp_1_9-bigenough ];
5471 };
55− multinomials = {};
5672 real-closed = {
5773 version = "1.0.3";
58− core-deps = with coqPackages; [ mathcomp_1_9-field ];
74+ core-deps = with coqPackages; [ mathcomp-field_1_9 ];
5975 extra-deps = with coqPackages; [ mathcomp_1_9-bigenough ];
6076 };
6177 };
@@ -64,37 +80,42 @@ versions = {
6480 bigenough.version = "1.0.0";
6581 analysis = {
6682 version = "0.2.2";
67− core-deps = with coqPackages; [ mathcomp_1_8-field ];
83+ core-deps = with coqPackages; [ mathcomp-field_1_8 ];
6884 extra-deps = with coqPackages; [ mathcomp_1_8-finmap mathcomp_1_8-bigenough ];
6985 };
7086 multinomials = {
71− version = "1.2";
72− core-deps = with coqPackages; [ mathcomp_1_8-algebra ];
87+ version = "1.3";
88+ core-deps = with coqPackages; [ mathcomp-algebra_1_8 ];
7389 extra-deps = with coqPackages; [ mathcomp_1_8-finmap mathcomp_1_8-bigenough ];
7490 };
7591 real-closed = {
7692 version = "1.0.3";
77− core-deps = with coqPackages; [ mathcomp_1_8-field ];
93+ core-deps = with coqPackages; [ mathcomp-field_1_8 ];
7894 extra-deps = with coqPackages; [ mathcomp_1_8-bigenough ];
7995 };
96+ coqeal = {
97+ version = "1.0.0";
98+ core-deps = with coqPackages; [ mathcomp-algebra_1_8 ];
99+ extra-deps = with coqPackages; [ bignums paramcoq mathcomp_1_8-multinomials ];
100+ };
80101 };
81102 "1.7.0" = {
82103 finmap.version = "1.1.0";
83104 bigenough.version = "1.0.0";
84105 analysis = {
85106 version = "0.1.0";
86− core-deps = with coqPackages; [ mathcomp_1_7-field ];
107+ core-deps = with coqPackages; [ mathcomp-field_1_7 ];
87108 extra-deps = with coqPackages; [ mathcomp_1_7-finmap mathcomp_1_7-bigenough ];
88109 };
89110 multinomials = {
90111 version = "1.1";
91− core-deps = with coqPackages; [ mathcomp_1_7-algebra ];
112+ core-deps = with coqPackages; [ mathcomp-algebra_1_7 ];
92113 extra-deps = with coqPackages; [ mathcomp_1_7-finmap_1_0 mathcomp_1_7-bigenough ];
93114 };
94115 real-closed = {
95116 version = "1.0.1";
96− core-deps = with coqPackages; [ mathcomp_1_8-field ];
97− extra-deps = with coqPackages; [ mathcomp_1_8-bigenough ];
117+ core-deps = with coqPackages; [ mathcomp-field_1_7 ];
118+ extra-deps = with coqPackages; [ mathcomp_1_7-bigenough ];
98119 };
99120 };
100121};
@@ -104,24 +125,25 @@ packageGen = {
104125 # optional arguments
105126 src ? "",
106127 owner ? "math-comp",
107− core-deps ? [ coqPackages.mathcomp-ssreflect ],
108128 extra-deps ? [],
109− mathcomp ? current-mathcomp,
129+ ssreflect ? current-ssreflect,
130+ core-deps ? null,
110131 compatibleCoqVersions ? null,
111− license ? mathcomp.meta.license,
132+ license ? ssreflect.meta.license,
112133 # mandatory
113134 package, version ? "broken", version-sha256, description
114135 }:
115136 let
116137 theCompatibleCoqVersions = if compatibleCoqVersions == null
117− then mathcomp.compatibleCoqVersions
138+ then ssreflect.compatibleCoqVersions
118139 else compatibleCoqVersions;
140+ mc-core-deps = if builtins.isNull core-deps then [ssreflect] else core-deps;
119141 in
120142 { "${package}" = let from = src; in
121143
122144 stdenv.mkDerivation rec {
123145 inherit version;
124− name = "coq${coq.coq-version}-mathcomp-${mathcomp.version}-${package}-${version}";
146+ name = "coq${coq.coq-version}-mathcomp${ssreflect.version}-${package}-${version}";
125147
126148 src = if from == "" then fetchFromGitHub {
127149 owner = owner;
@@ -130,7 +152,7 @@ packageGen = {
130152 sha256 = version-sha256."${version}";
131153 } else from;
132154
133− propagatedBuildInputs = [ coq mathcomp ] ++ extra-deps;
155+ propagatedBuildInputs = [ coq ] ++ mc-core-deps ++ extra-deps;
134156
135157 installFlags = "-f Makefile.coq COQLIB=$(out)/lib/coq/${coq.coq-version}/";
136158
@@ -138,7 +160,7 @@ packageGen = {
138160 inherit description;
139161 inherit license;
140162 inherit (src.meta) homepage;
141− inherit (mathcomp.meta) platforms;
163+ inherit (ssreflect.meta) platforms;
142164 maintainers = [ stdenv.lib.maintainers.vbgl ];
143165 broken = (version == "broken");
144166 };
@@ -151,14 +173,14 @@ packageGen = {
151173 };
152174 };
153175
154−current-versions = versions."${current-mathcomp.version}" or {};
176+current-versions = versions."${current-ssreflect.version}" or {};
155177
156178select = x: mapAttrs (n: pkg: {package = n;} // pkg) (recursiveUpdate param x);
157179
158180for-version = v: suffix: (mapAttrs' (n: pkg:
159181 {name = "mathcomp_${suffix}-${n}";
160182 value = (packageGen ({
161− mathcomp = coqPackages."mathcomp_${suffix}";
183+ ssreflect = coqPackages."mathcomp-ssreflect_${suffix}";
162184 } // pkg))."${n}";})
163185 (select versions."${v}"));
164186
@@ -173,7 +195,8 @@ in
173195mathcompExtraGen = packageGen;
174196mathcomp_1_7-finmap_1_0 =
175197 (packageGen (select {finmap = {version = "1.0.0";
176− mathcomp = coqPackages.mathcomp_1_7;};
198+ ssreflect = coqPackages.mathcomp-ssreflect_1_7;};
177199 }).finmap).finmap;
178200multinomials = all.mathcomp-multinomials;
201+coqeal = all.mathcomp-coqeal;
179202} // all