Merge pull request #250907 from vbgl/ocaml-ppx_deriving-noomp

ocamlPackages.ppx_deriving: do not (always) depend on OMP

authored by

Ulrik Strid and committed by
GitHub
9edb077a 7b65cc2d

+2 -10
+2 -10
pkgs/development/ocaml-modules/ppx_deriving/default.nix
··· 10 , ounit 11 , ounit2 12 , ocaml-migrate-parsetree 13 - , ocaml-migrate-parsetree-2 14 }: 15 16 let params = 17 if lib.versionAtLeast ppxlib.version "0.20" then { 18 version = "5.2.1"; 19 sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9"; 20 - useOMP2 = true; 21 } else if lib.versionAtLeast ppxlib.version "0.15" then { 22 version = "5.1"; 23 sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh"; 24 - useOMP2 = false; 25 } else { 26 version = "5.0"; 27 sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3"; 28 - useOMP2 = false; 29 } 30 ; in 31 32 buildDunePackage rec { 33 pname = "ppx_deriving"; 34 inherit (params) version; 35 - 36 - duneVersion = "3"; 37 38 src = fetchurl { 39 url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz"; ··· 44 45 nativeBuildInputs = [ cppo ]; 46 buildInputs = [ findlib ppxlib ]; 47 - propagatedBuildInputs = [ 48 - (if params.useOMP2 49 - then ocaml-migrate-parsetree-2 50 - else ocaml-migrate-parsetree) 51 ppx_derivers 52 result 53 ];
··· 10 , ounit 11 , ounit2 12 , ocaml-migrate-parsetree 13 }: 14 15 let params = 16 if lib.versionAtLeast ppxlib.version "0.20" then { 17 version = "5.2.1"; 18 sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9"; 19 } else if lib.versionAtLeast ppxlib.version "0.15" then { 20 version = "5.1"; 21 sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh"; 22 } else { 23 version = "5.0"; 24 sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3"; 25 } 26 ; in 27 28 buildDunePackage rec { 29 pname = "ppx_deriving"; 30 inherit (params) version; 31 32 src = fetchurl { 33 url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz"; ··· 38 39 nativeBuildInputs = [ cppo ]; 40 buildInputs = [ findlib ppxlib ]; 41 + propagatedBuildInputs = 42 + lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree ++ [ 43 ppx_derivers 44 result 45 ];