lol

coqPackages.mathcomp-boot: init at master (future 2.5.0)

authored by

Pierre Roux and committed by
Vincent Laporte
0401f9a2 952c7177

+45 -15
+1
pkgs/development/coq-modules/mathcomp-analysis/default.nix
··· 167 167 package: 168 168 let 169 169 classical-deps = [ 170 + mathcomp.ssreflect 170 171 mathcomp.algebra 171 172 mathcomp-finmap 172 173 ];
+42 -15
pkgs/development/coq-modules/mathcomp/default.nix
··· 131 131 releaseRev = v: "mathcomp-${v}"; 132 132 133 133 # list of core mathcomp packages sorted by dependency order 134 - packages = [ 135 - "ssreflect" 136 - "fingroup" 137 - "algebra" 138 - "solvable" 139 - "field" 140 - "character" 141 - "all" 142 - ]; 134 + packages = { 135 + "boot" = [ ]; 136 + "order" = [ "boot" ]; 137 + "fingroup" = [ "boot" ]; 138 + "ssreflect" = [ 139 + "boot" 140 + "order" 141 + ]; 142 + "algebra" = [ 143 + "order" 144 + "fingroup" 145 + ]; 146 + "solvable" = [ "algebra" ]; 147 + "field" = [ "solvable" ]; 148 + "character" = [ "field" ]; 149 + "all" = [ "character" ]; 150 + }; 143 151 144 152 mathcomp_ = 145 153 package: 146 154 let 147 - mathcomp-deps = lib.optionals (package != "single") ( 148 - map mathcomp_ (lib.head (lib.splitList (lib.pred.equal package) packages)) 149 - ); 155 + mathcomp-deps = lib.optionals (package != "single") (map mathcomp_ packages.${package}); 150 156 pkgpath = if package == "single" then "." else package; 151 157 pname = if package == "single" then "mathcomp" else "mathcomp-${package}"; 152 158 pkgallMake = '' ··· 188 194 + '' 189 195 # handle mathcomp < 2.4.0 which had an extra base mathcomp directory 190 196 test -d mathcomp && cd mathcomp 191 - cd ${pkgpath} 197 + cd ${pkgpath} || cd ssreflect # before 2.5, boot didn't exist, make it behave as ssreflect 192 198 '' 193 199 + lib.optionalString (package == "all") pkgallMake; 194 200 ··· 202 208 ]; 203 209 }; 204 210 } 205 - // lib.optionalAttrs (package != "single") { passthru = lib.genAttrs packages mathcomp_; } 211 + // lib.optionalAttrs (package != "single") { passthru = lib.mapAttrs (p: _: mathcomp_ p) packages; } 206 212 // lib.optionalAttrs withDoc { 207 213 htmldoc_template = fetchzip { 208 214 url = "https://github.com/math-comp/math-comp.github.io/archive/doc-1.12.0.zip"; ··· 264 270 propagatedBuildInputs = o.propagatedBuildInputs ++ [ stdlib ]; 265 271 } 266 272 ); 273 + # boot and order packages didn't exist before 2.5, 274 + # so make boot behave as ssreflect then (c.f., above) 275 + # and building nothing in order and ssreflect 276 + patched-derivation5 = patched-derivation4.overrideAttrs ( 277 + o: 278 + lib.optionalAttrs 279 + ( 280 + lib.elem package [ 281 + "order" 282 + "ssreflect" 283 + ] 284 + && o.version != null 285 + && o.version != "dev" 286 + && lib.versions.isLt "2.5" o.version 287 + ) 288 + { 289 + preBuild = ""; 290 + buildPhase = "echo doing nothing"; 291 + installPhase = "echo doing nothing"; 292 + } 293 + ); 267 294 in 268 - patched-derivation4; 295 + patched-derivation5; 269 296 in 270 297 mathcomp_ (if single then "single" else "all")
+2
pkgs/top-level/coq-packages.nix
··· 129 129 math-classes = callPackage ../development/coq-modules/math-classes { }; 130 130 mathcomp = callPackage ../development/coq-modules/mathcomp { }; 131 131 ssreflect = self.mathcomp.ssreflect; 132 + mathcomp-boot = self.mathcomp.boot; 133 + mathcomp-order = self.mathcomp.order; 132 134 mathcomp-ssreflect = self.mathcomp.ssreflect; 133 135 mathcomp-fingroup = self.mathcomp.fingroup; 134 136 mathcomp-algebra = self.mathcomp.algebra;