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).

+16 -16
+16 -16
pkgs/development/coq-modules/bignums/default.nix
··· 1 { stdenv, fetchFromGitHub, coq }: 2 3 - let rev_and_sha = { 4 - "8.6" = { 5 - rev = "v8.6.0"; 6 - sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj"; 7 - }; 8 - "8.7" = { 9 - rev = "V8.7.0"; 10 - sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl"; 11 - }; 12 - }; 13 - in 14 - 15 - if ! (rev_and_sha ? "${coq.coq-version}") then 16 - throw "bignums is not available for Coq ${coq.coq-version}" 17 - else with rev_and_sha."${coq.coq-version}"; 18 19 stdenv.mkDerivation rec { 20 ··· 23 src = fetchFromGitHub { 24 owner = "coq"; 25 repo = "bignums"; 26 - inherit rev sha256; 27 }; 28 29 buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ]; ··· 35 platforms = coq.meta.platforms; 36 }; 37 38 }
··· 1 { stdenv, fetchFromGitHub, coq }: 2 3 + let param = 4 + { 5 + "8.6" = { 6 + rev = "v8.6.0"; 7 + sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj"; 8 + }; 9 + "8.7" = { 10 + rev = "V8.7.0"; 11 + sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl"; 12 + }; 13 + }."${coq.coq-version}" 14 + ; in 15 16 stdenv.mkDerivation rec { 17 ··· 20 src = fetchFromGitHub { 21 owner = "coq"; 22 repo = "bignums"; 23 + inherit (param) rev sha256; 24 }; 25 26 buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ]; ··· 32 platforms = coq.meta.platforms; 33 }; 34 35 + passthru = { 36 + compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" ]; 37 + }; 38 }