diff options
author | John Wiegley <johnw@newartisans.com> | 2018-03-06 07:17:45 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2018-03-06 07:46:51 -0800 |
commit | 4bd69fd24959d33b3f22f54d5447e509447aa9c9 (patch) | |
tree | 90992242b7dd3f7a5865fd0fadaae2c5ab165fe9 /pkgs/development | |
parent | 9186aa1bf8bd579d7f8016d19433c8c5e0cd84b6 (diff) | |
download | nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar.gz nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar.bz2 nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar.lz nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar.xz nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.tar.zst nixlib-4bd69fd24959d33b3f22f54d5447e509447aa9c9.zip |
coqPackages.bignums: Change expression to match other Coq packages
Without this change, it's impossible to override bignums, or ignore it when creating custom datasets for other versions of Coq (such as 8.8+alpha).
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/coq-modules/bignums/default.nix | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/pkgs/development/coq-modules/bignums/default.nix b/pkgs/development/coq-modules/bignums/default.nix index 5762da66fedd..9d035fec9f96 100644 --- a/pkgs/development/coq-modules/bignums/default.nix +++ b/pkgs/development/coq-modules/bignums/default.nix @@ -1,20 +1,17 @@ { stdenv, fetchFromGitHub, coq }: -let rev_and_sha = { - "8.6" = { - rev = "v8.6.0"; - sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj"; - }; - "8.7" = { - rev = "V8.7.0"; - sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl"; - }; -}; -in - -if ! (rev_and_sha ? "${coq.coq-version}") then - throw "bignums is not available for Coq ${coq.coq-version}" -else with rev_and_sha."${coq.coq-version}"; +let param = + { + "8.6" = { + rev = "v8.6.0"; + sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj"; + }; + "8.7" = { + rev = "V8.7.0"; + sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl"; + }; + }."${coq.coq-version}" +; in stdenv.mkDerivation rec { @@ -23,7 +20,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "coq"; repo = "bignums"; - inherit rev sha256; + inherit (param) rev sha256; }; buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ]; @@ -35,4 +32,7 @@ stdenv.mkDerivation rec { platforms = coq.meta.platforms; }; + passthru = { + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" ]; + }; } |