mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 21:09:00 +02:00
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).
This commit is contained in:
parent
9186aa1bf8
commit
4bd69fd249
|
@ -1,6 +1,7 @@
|
||||||
{ stdenv, fetchFromGitHub, coq }:
|
{ stdenv, fetchFromGitHub, coq }:
|
||||||
|
|
||||||
let rev_and_sha = {
|
let param =
|
||||||
|
{
|
||||||
"8.6" = {
|
"8.6" = {
|
||||||
rev = "v8.6.0";
|
rev = "v8.6.0";
|
||||||
sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj";
|
sha256 = "0553pcsy21cyhmns6k9qggzb67az8kl31d0lwlnz08bsqswigzrj";
|
||||||
|
@ -9,12 +10,8 @@ let rev_and_sha = {
|
||||||
rev = "V8.7.0";
|
rev = "V8.7.0";
|
||||||
sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl";
|
sha256 = "11c4sdmpd3l6jjl4v6k213z9fhrmmm1xnly3zmzam1wrrdif4ghl";
|
||||||
};
|
};
|
||||||
};
|
}."${coq.coq-version}"
|
||||||
in
|
; 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}";
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
|
@ -23,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "coq";
|
owner = "coq";
|
||||||
repo = "bignums";
|
repo = "bignums";
|
||||||
inherit rev sha256;
|
inherit (param) rev sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ];
|
buildInputs = [ coq.ocaml coq.camlp5 coq.findlib coq ];
|
||||||
|
@ -35,4 +32,7 @@ stdenv.mkDerivation rec {
|
||||||
platforms = coq.meta.platforms;
|
platforms = coq.meta.platforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue