summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/sedlex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/sedlex/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/sedlex/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix
index 947896e8ef1..a6a7604208a 100644
--- a/pkgs/development/ocaml-modules/sedlex/default.nix
+++ b/pkgs/development/ocaml-modules/sedlex/default.nix
@@ -8,6 +8,16 @@
 , uchar
 }:
 
+let param =
+  if lib.versionAtLeast ppxlib.version "0.26.0" then {
+    version = "2.6";
+    sha256 = "sha256-AU+dV+jTG9v3BXzip2Bnv04Ewyo3pyUglDDBFsOsFf0=";
+  } else {
+    version = "2.5";
+    sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy";
+  }
+; in
+
 let
   unicodeVersion = "15.0.0";
   baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
@@ -27,7 +37,7 @@ let
 in
 buildDunePackage rec {
   pname = "sedlex";
-  version = "2.6";
+  inherit (param) version;
 
   minimalOCamlVersion = "4.08";
 
@@ -35,7 +45,7 @@ buildDunePackage rec {
     owner = "ocaml-community";
     repo = "sedlex";
     rev = "v${version}";
-    sha256 = "sha256-AU+dV+jTG9v3BXzip2Bnv04Ewyo3pyUglDDBFsOsFf0=";
+    inherit (param) sha256;
   };
 
   propagatedBuildInputs = [