diff options
author | Cyril Cohen <cohen@crans.org> | 2019-05-20 11:38:26 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2019-05-21 08:55:38 +0200 |
commit | d16a78b51219ec382709c67901a5ce0b1f74802c (patch) | |
tree | 6894eb3aeb7eb15134d5a75d98b8e7fc5a6b167c /pkgs/development/coq-modules | |
parent | 3efd90e3c94f0ddfba19b9877ad72df1b2277df0 (diff) | |
download | nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar.gz nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar.bz2 nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar.lz nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar.xz nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.tar.zst nixpkgs-d16a78b51219ec382709c67901a5ce0b1f74802c.zip |
several fixes in coq and coqPackages.mathcomp (and extras)
Diffstat (limited to 'pkgs/development/coq-modules')
-rw-r--r-- | pkgs/development/coq-modules/mathcomp/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/coq-modules/mathcomp/extra.nix | 19 |
2 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/development/coq-modules/mathcomp/default.nix b/pkgs/development/coq-modules/mathcomp/default.nix index aa6da1a1e28..a9933692db3 100644 --- a/pkgs/development/coq-modules/mathcomp/default.nix +++ b/pkgs/development/coq-modules/mathcomp/default.nix @@ -16,9 +16,10 @@ let "1.6.1" = flip elem ["8.5"]; }; # computes the default version of mathcomp given a version of Coq - min-mathcomp-version = head (naturalSort (attrNames mathcomp-coq-versions)); - default-mathcomp-version = last (naturalSort ([min-mathcomp-version] + max-mathcomp-version = last (naturalSort (attrNames mathcomp-coq-versions)); + default-mathcomp-version = let v = last (naturalSort (["0.0.0"] ++ (attrNames (filterAttrs (_: vs: vs coq.coq-version) mathcomp-coq-versions)))); + in if v == "0.0.0" then max-mathcomp-version else v; # list of core mathcomp packages sorted by dependency order mathcomp-packages = diff --git a/pkgs/development/coq-modules/mathcomp/extra.nix b/pkgs/development/coq-modules/mathcomp/extra.nix index ef387985e06..3666d54a786 100644 --- a/pkgs/development/coq-modules/mathcomp/extra.nix +++ b/pkgs/development/coq-modules/mathcomp/extra.nix @@ -75,11 +75,9 @@ packageGen = { mathcomp ? current-mathcomp, license ? mathcomp.meta.license, # mandatory - package, version, version-sha256, description + package, version ? "broken", version-sha256, description }: - if version == "" then {} - else { "${package}" = - let from = src; in + { "${package}" = let from = src; in stdenv.mkDerivation rec { inherit version; @@ -102,19 +100,20 @@ packageGen = { inherit (src.meta) homepage; inherit (mathcomp.meta) platforms; maintainers = [ stdenv.lib.maintainers.vbgl ]; + broken = (version == "broken"); }; passthru = { inherit version-sha256; - compatibleCoqVersions = v: builtins.elem v coq-versions; + compatibleCoqVersions = if meta.broken then _: false else + v: builtins.elem v coq-versions; }; - };}; + }; + }; -current-versions = versions."${current-mathcomp.version}" - or (throw "no mathcomp extra packages found for mathcomp ${current-mathcomp.version}"); +current-versions = versions."${current-mathcomp.version}" or {}; -select = x: mapAttrs (n: pkg: {package = n;} // pkg) - (recursiveUpdate (overrideExisting x param) x); +select = x: mapAttrs (n: pkg: {package = n;} // pkg) (recursiveUpdate param x); all = (mapAttrs' (n: pkg: {name = "mathcomp_1_7-${n}"; |