summary refs log tree commit diff
path: root/pkgs/build-support/coq/meta-fetch
diff options
context:
space:
mode:
authorCyril Cohen <CohenCyril@users.noreply.github.com>2021-03-10 16:25:32 +0100
committerGitHub <noreply@github.com>2021-03-10 16:25:32 +0100
commit1550a4fe6bc4e6daacba73eb305ec62492846466 (patch)
treee8cb8000ac725b12034dff80344e3145fdde9e47 /pkgs/build-support/coq/meta-fetch
parent7cad6e22eadbb016da5a29a284d40640f66f3c66 (diff)
downloadnixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar.gz
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar.bz2
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar.lz
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar.xz
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.tar.zst
nixpkgs-1550a4fe6bc4e6daacba73eb305ec62492846466.zip
coqPackages.multinomials: 1.5.2 -> 1.5.4 (#115427)
- This is the first packages which uses Dune in order to build and install
  so I had to refactor build-support/coq/default.nix in order to support it.
- I added a new feature: one can now release.v.sha256 empty to try to download
  with a fake sha256, hence failures are reported and one can copy paste the
  sha256 given by the error message.
- I updated the documentation of languages-frameworks/coq.section.md accordingly.
Diffstat (limited to 'pkgs/build-support/coq/meta-fetch')
-rw-r--r--pkgs/build-support/coq/meta-fetch/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/build-support/coq/meta-fetch/default.nix b/pkgs/build-support/coq/meta-fetch/default.nix
index b01ae72a208..e7b15af4f06 100644
--- a/pkgs/build-support/coq/meta-fetch/default.nix
+++ b/pkgs/build-support/coq/meta-fetch/default.nix
@@ -39,10 +39,13 @@ switch arg [
   { case = isPathString; out = { version = "dev"; src = arg; }; }
   { case = pred.union isVersion isShortVersion;
     out = let v = if isVersion arg then arg else shortVersion arg; in
-      if !release.${v}?sha256 then throw "meta-fetch: a sha256 must be provided for each release"
-      else {
-        version = release.${v}.version or v;
-        src = release.${v}.src or fetcher (location // { rev = releaseRev v; } // release.${v});
+      let
+        given-sha256 = release.${v}.sha256 or "";
+        sha256 = if given-sha256 == "" then lib.fakeSha256 else given-sha256;
+        rv = release.${v} // { inherit sha256; }; in
+      {
+        version = rv.version or v;
+        src = rv.src or fetcher (location // { rev = releaseRev v; } // rv);
       };
     }
   { case = isString;