git.iko.soy/typeable/nixpkgs
on master help sign in
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).

commit4bd69fd24959d33b3f22f54d5447e509447aa9c9 authorJohn Wiegley <johnw@newartisans.com> dateTue 6 Mar 2018, 07:17 (9 years ago) parent9186aa1
1 file changed+16−16
pkgs/development/coq-modules/bignums/default.nix+16−16
pkgs/development/coq-modules/bignums/default.nix+16−16
@@ -1,20 +1,17 @@
11{ stdenv, fetchFromGitHub, coq }:
22
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}";
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
1815
1916stdenv.mkDerivation rec {
2017
@@ -23,7 +20,7 @@ stdenv.mkDerivation rec {
2320 src = fetchFromGitHub {
2421 owner = "coq";
2522 repo = "bignums";
26− inherit rev sha256;
23+ inherit (param) rev sha256;
2724 };
2825
2926 buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ];
@@ -35,4 +32,7 @@ stdenv.mkDerivation rec {
3532 platforms = coq.meta.platforms;
3633 };
3734
35+ passthru = {
36+ compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" ];
37+ };
3838}