about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2024-05-16 08:59:20 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2024-05-16 09:24:36 +0200
commit24f45cfe0b5d1c7d9a43347953d594fea5964c85 (patch)
treea8b366cd221617e51b0e35149e3dd56d7c7e7c40 /pkgs/development/ocaml-modules
parent6a61a266205a320689c61745a31a4fe275427ba5 (diff)
ocamlPackages.ppx_import: 1.10.0 → 1.11.0
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/ppx_import/default.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_import/default.nix b/pkgs/development/ocaml-modules/ppx_import/default.nix
index 8330aead80ea6..23454e2dadccf 100644
--- a/pkgs/development/ocaml-modules/ppx_import/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_import/default.nix
@@ -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 = [