Merge pull request #312147 from vbgl/ocaml-ppx_import-1.11.0

ocamlPackages.ppx_import: 1.10.0 → 1.11.0
This commit is contained in:
Ulrik Strid 2024-05-17 16:02:50 +02:00 committed by GitHub
commit b7fe7b940a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,18 +6,9 @@
, ppx_deriving
, ppx_sexp_conv
, ppxlib
, version ? if lib.versionAtLeast ocaml.version "4.11" then "1.10.0" else "1.9.1"
, version ? if lib.versionAtLeast ocaml.version "4.11" then "1.11.0" else "1.9.1"
}:
let param = {
"1.9.1" = {
sha256 = "sha256-0bSY4u44Ds84XPIbcT5Vt4AG/4PkzFKMl9CDGFZyIdI=";
};
"1.10.0" = {
sha256 = "sha256-MA8sf0F7Ch1wJDL8E8470ukKx7KieWyjWJnJQsqBVW8=";
};
}."${version}"; in
lib.throwIfNot (lib.versionAtLeast ppxlib.version "0.24.0")
"ppx_import is not available with ppxlib-${ppxlib.version}"
@ -26,11 +17,15 @@ buildDunePackage rec {
inherit version;
minimalOCamlVersion = "4.05";
duneVersion = "3";
src = fetchurl {
url = "https://github.com/ocaml-ppx/ppx_import/releases/download/${version}/ppx_import-${version}.tbz";
inherit (param) sha256;
url = let dir = if lib.versionAtLeast version "1.11" then "v${version}" else "${version}"; in
"https://github.com/ocaml-ppx/ppx_import/releases/download/${dir}/ppx_import-${version}.tbz";
hash = {
"1.9.1" = "sha256-0bSY4u44Ds84XPIbcT5Vt4AG/4PkzFKMl9CDGFZyIdI=";
"1.11.0" = "sha256-Jmfv1IkQoaTkyxoxp9FI0ChNESqCaoDsA7D4ZUbOrBo=";
}."${version}";
};
propagatedBuildInputs = [