summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2023-11-22 10:21:38 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2023-11-29 11:08:47 +0100
commit4cb57ac11f2bb63dfc6ab1c0ca438ef980318092 (patch)
tree9d3f2bcd975b7b10e0c744d4fa0b4f23567ea148
parent2ad9b5d4f67bc0f07780b4fc80c11938fc2938b3 (diff)
coqPackages.mathcomp-word: 2.1 → {2.2, 3.0}
(cherry picked from commit c64716163639288d5376f8c4399f1ce8809404e4)
-rw-r--r--pkgs/development/coq-modules/mathcomp-word/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/pkgs/development/coq-modules/mathcomp-word/default.nix b/pkgs/development/coq-modules/mathcomp-word/default.nix
index c829870e457b9..db8a23ea658a8 100644
--- a/pkgs/development/coq-modules/mathcomp-word/default.nix
+++ b/pkgs/development/coq-modules/mathcomp-word/default.nix
@@ -1,22 +1,32 @@
-{ coq, mkCoqDerivation, mathcomp, lib, version ? null }:
+{ fetchurl, coq, mkCoqDerivation, mathcomp, lib, version ? null }:
 
-mkCoqDerivation {
+let
   namePrefix = [ "coq" "mathcomp" ];
   pname = "word";
+  fetcher = { domain, owner, repo, rev, sha256, ...}:
+  fetchurl {
+    url = "https://${domain}/${owner}/${repo}/releases/download/${rev}/${lib.concatStringsSep "-" (namePrefix ++ [ pname ])}-${rev}.tbz";
+    inherit sha256;
+  };
+in
+
+mkCoqDerivation {
+  inherit namePrefix pname fetcher;
   owner = "jasmin-lang";
   repo = "coqword";
   useDune = true;
 
   releaseRev = v: "v${v}";
 
-  release."2.1".sha256 = "sha256-oN/zvnePq64Nt7l/zIDLdhb4t9ayKxnZCsn+pzqS030=";
-  release."2.0".sha256 = "sha256-x9AEFadlYiIIOxAhjv4Vc/dxdRZC7AdWQ6AByvLOFDk=";
-  release."1.1".sha256 = "sha256:0jb28vgkr4xpg9d6k85rq7abpx5ch612iw9ps5w8q80q1jpjlc4z";
-  release."1.0".sha256 = "sha256:0703m97rnivcbc7vvbd9rl2dxs6l8n52cbykynw61c6w9rhxspcg";
+  release."3.0".sha256 = "sha256-xEgx5HHDOimOJbNMtIVf/KG3XBemOS9XwoCoW6btyJ4=";
+  release."2.2".sha256 = "sha256-8BB6SToCrMZTtU78t2K+aExuxk9O1lCqVQaa8wabSm8=";
+  release."2.1".sha256 = "sha256-895gZzwwX8hN9UUQRhcgRlphHANka9R0PRotfmSEelA=";
+  release."2.0".sha256 = "sha256-ySg3AviGGY5jXqqn1cP6lTw3aS5DhawXEwNUgj7pIjA=";
 
   inherit version;
   defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [
-    { cases = [ (range "8.12" "8.18") (isGe "1.12") ]; out = "2.1"; }
+    { cases = [ (range "8.16" "8.18") (isGe "2.0")          ]; out = "3.0"; }
+    { cases = [ (range "8.12" "8.18") (range "1.12" "1.18") ]; out = "2.2"; }
   ] null;
 
   propagatedBuildInputs = [ mathcomp.algebra mathcomp.ssreflect mathcomp.fingroup ];