2024-01-02 11:29:13 +00:00
|
|
|
{ fetchurl, coq, mkCoqDerivation, mathcomp, lib, version ? null }:
|
2021-12-25 05:07:40 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
let
|
2021-12-25 05:07:40 +00:00
|
|
|
namePrefix = [ "coq" "mathcomp" ];
|
|
|
|
pname = "word";
|
2024-07-27 06:49:29 +00:00
|
|
|
fetcher = { domain, owner, repo, rev, sha256 ? null, ...}:
|
|
|
|
let prefix = "https://${domain}/${owner}/${repo}/"; in
|
|
|
|
if sha256 == null then
|
|
|
|
fetchTarball { url = "${prefix}archive/refs/heads/${rev}.tar.gz"; } else
|
2024-01-02 11:29:13 +00:00
|
|
|
fetchurl {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "${prefix}releases/download/${rev}/${lib.concatStringsSep "-" (namePrefix ++ [ pname ])}-${rev}.tbz";
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
mkCoqDerivation {
|
|
|
|
inherit namePrefix pname fetcher;
|
2021-12-25 05:07:40 +00:00
|
|
|
owner = "jasmin-lang";
|
|
|
|
repo = "coqword";
|
2022-10-06 18:32:54 +00:00
|
|
|
useDune = true;
|
2021-12-25 05:07:40 +00:00
|
|
|
|
|
|
|
releaseRev = v: "v${v}";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
release."3.2".sha256 = "sha256-4HOFFQzKbHIq+ktjJaS5b2Qr8WL1eQ26YxF4vt1FdWM=";
|
2024-04-21 15:54:59 +00:00
|
|
|
release."3.1".sha256 = "sha256-qQHis6554sG7NpCpWhT2wvelnxsrbEPVNv3fpxwxHMU=";
|
2024-01-02 11:29:13 +00:00
|
|
|
release."3.0".sha256 = "sha256-xEgx5HHDOimOJbNMtIVf/KG3XBemOS9XwoCoW6btyJ4=";
|
2024-06-05 15:53:02 +00:00
|
|
|
release."2.4".sha256 = "sha256-OG99PfjhtKikxM9aBKRsej1gTo1O/llAdXdiiyjZf2Q=";
|
2024-04-21 15:54:59 +00:00
|
|
|
release."2.3".sha256 = "sha256-whU1yvFFuxpwQutW41B/WBg5DrVZJW/Do/GuHtzuI3U=";
|
2024-01-02 11:29:13 +00:00
|
|
|
release."2.2".sha256 = "sha256-8BB6SToCrMZTtU78t2K+aExuxk9O1lCqVQaa8wabSm8=";
|
|
|
|
release."2.1".sha256 = "sha256-895gZzwwX8hN9UUQRhcgRlphHANka9R0PRotfmSEelA=";
|
|
|
|
release."2.0".sha256 = "sha256-ySg3AviGGY5jXqqn1cP6lTw3aS5DhawXEwNUgj7pIjA=";
|
2021-12-25 05:07:40 +00:00
|
|
|
|
|
|
|
inherit version;
|
2023-02-02 18:25:31 +00:00
|
|
|
defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [
|
2024-07-01 15:47:52 +00:00
|
|
|
{ cases = [ (range "8.16" "8.20") (isGe "2.0") ]; out = "3.2"; }
|
|
|
|
{ cases = [ (range "8.12" "8.20") (range "1.12" "1.19") ]; out = "2.4"; }
|
2021-12-25 05:07:40 +00:00
|
|
|
] null;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
propagatedBuildInputs = [ mathcomp.algebra mathcomp.ssreflect mathcomp.fingroup ];
|
2021-12-25 05:07:40 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2021-12-25 05:07:40 +00:00
|
|
|
description = "Yet Another Coq Library on Machine Words";
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|