summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrik Strid <ulrik.strid@outlook.com>2023-08-23 14:39:21 +0200
committerGitHub <noreply@github.com>2023-08-23 14:39:21 +0200
commit9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31 (patch)
tree3aa0c4123d95e0198105c6e6b082f29db659745d
parent7b65cc2dea1fe9be40aefb761b162308540acf02 (diff)
parent62a2b30b0951e6739d661e8870aea553a82f904b (diff)
downloadnixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar.gz
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar.bz2
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar.lz
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar.xz
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.tar.zst
nixpkgs-9edb077ace8bf9c281a0dfc85351ed2d5c3d2a31.zip
Merge pull request #250907 from vbgl/ocaml-ppx_deriving-noomp
ocamlPackages.ppx_deriving: do not (always) depend on OMP
-rw-r--r--pkgs/development/ocaml-modules/ppx_deriving/default.nix12
1 files changed, 2 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix
index 031c8335186..314f52f40fc 100644
--- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix
@@ -10,22 +10,18 @@
 , ounit
 , ounit2
 , ocaml-migrate-parsetree
-, ocaml-migrate-parsetree-2
 }:
 
 let params =
   if lib.versionAtLeast ppxlib.version "0.20" then {
     version = "5.2.1";
     sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
-    useOMP2 = true;
   } else if lib.versionAtLeast ppxlib.version "0.15" then {
     version = "5.1";
     sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
-    useOMP2 = false;
   } else {
     version = "5.0";
     sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
-    useOMP2 = false;
   }
 ; in
 
@@ -33,8 +29,6 @@ buildDunePackage rec {
   pname = "ppx_deriving";
   inherit (params) version;
 
-  duneVersion = "3";
-
   src = fetchurl {
     url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz";
     inherit (params) sha256;
@@ -44,10 +38,8 @@ buildDunePackage rec {
 
   nativeBuildInputs = [ cppo ];
   buildInputs = [ findlib ppxlib ];
-  propagatedBuildInputs = [
-    (if params.useOMP2
-    then ocaml-migrate-parsetree-2
-    else ocaml-migrate-parsetree)
+  propagatedBuildInputs =
+    lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree ++ [
     ppx_derivers
     result
   ];