diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2022-11-09 20:41:22 +0100 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2022-11-09 20:41:22 +0100 |
commit | d6c30bbf704122ac71f29b5db4a707e5948a81fb (patch) | |
tree | 407c2d7549476fd1bad7a52708156923d209aabc | |
parent | 15b6e9efd4f4f7a2f0d530f102edd2f07f787d78 (diff) | |
download | nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar.gz nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar.bz2 nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar.lz nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar.xz nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.tar.zst nixpkgs-d6c30bbf704122ac71f29b5db4a707e5948a81fb.zip |
ppxlib: default to 0.28.0 for OCaml ≥ 4.11 only
6 files changed, 30 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/pkgs/development/ocaml-modules/bisect_ppx/default.nix index 6f54163a40f..4ecfea79e15 100644 --- a/pkgs/development/ocaml-modules/bisect_ppx/default.nix +++ b/pkgs/development/ocaml-modules/bisect_ppx/default.nix @@ -11,7 +11,7 @@ buildDunePackage rec { sha256 = "sha256-pOeeSxzUF1jXQjA71atSZALdgQ2NB9qpKo5iaDnPwhQ="; }; - patches = [ + patches = lib.optionals (lib.versionAtLeast ppxlib.version "0.26.0") [ # Ppxlib >= 0.26.0 compatibility # remove when a new version is released (fetchpatch { @@ -26,8 +26,7 @@ buildDunePackage rec { }) ]; - minimumOCamlVersion = "4.08"; - useDune2 = true; + minimalOCamlVersion = "4.08"; buildInputs = [ cmdliner diff --git a/pkgs/development/ocaml-modules/gen_js_api/default.nix b/pkgs/development/ocaml-modules/gen_js_api/default.nix index fa86c0e710b..4baa21c57cf 100644 --- a/pkgs/development/ocaml-modules/gen_js_api/default.nix +++ b/pkgs/development/ocaml-modules/gen_js_api/default.nix @@ -18,7 +18,7 @@ buildDunePackage rec { sha256 = "sha256-0FKKYPbSBza/Q6oZniq/UHi5zBjD/i7j5ds3ZDWkBTs="; }; - minimalOCamlVersion = "4.08"; + minimalOCamlVersion = "4.11"; propagatedBuildInputs = [ ojs ppxlib ]; checkInputs = [ js_of_ocaml-compiler nodejs ]; diff --git a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix index 3350181dda4..e432e5f963e 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix @@ -12,7 +12,7 @@ buildDunePackage rec { pname = "ppx_deriving_cmdliner"; version = "0.6.1"; - minimalOCamlVersion = "4.08"; + minimalOCamlVersion = "4.11"; src = fetchFromGitHub { owner = "hammerlab"; diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix index eb06b40e618..4fef3c0619f 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix @@ -2,9 +2,19 @@ , ppx_deriving, yojson }: +let param = + if lib.versionAtLeast ppxlib.version "0.26" then { + version = "3.7.0"; + sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k="; + } else { + version = "3.6.1"; + sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"; + } +; in + buildDunePackage rec { pname = "ppx_deriving_yojson"; - version = "3.7.0"; + inherit (param) version; minimalOCamlVersion = "4.07"; @@ -12,7 +22,7 @@ buildDunePackage rec { owner = "ocaml-ppx"; repo = "ppx_deriving_yojson"; rev = "v${version}"; - sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k="; + inherit (param) sha256; }; propagatedBuildInputs = [ ppxlib ppx_deriving yojson ]; diff --git a/pkgs/development/ocaml-modules/ppxlib/default.nix b/pkgs/development/ocaml-modules/ppxlib/default.nix index 48f4128f213..92090c24414 100644 --- a/pkgs/development/ocaml-modules/ppxlib/default.nix +++ b/pkgs/development/ocaml-modules/ppxlib/default.nix @@ -2,7 +2,8 @@ , version ? if lib.versionAtLeast ocaml.version "4.07" then if lib.versionAtLeast ocaml.version "4.08" - then "0.28.0" else "0.15.0" else "0.13.0" + then if lib.versionAtLeast ocaml.version "4.11" + then "0.28.0" else "0.24.0" else "0.15.0" else "0.13.0" , ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio , stdlib-shims, ocaml-migrate-parsetree-2 }: 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 = [ |