From 0231a79c1dcde4e1ec5a4ca15e6240fd50bb8ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 08:31:29 -0300 Subject: [PATCH 01/12] ocamlPackages.ppxlib: 0.24.0 -> 0.28.0 --- pkgs/development/ocaml-modules/ppxlib/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/ppxlib/default.nix b/pkgs/development/ocaml-modules/ppxlib/default.nix index 2b7feddfa89b..48f4128f2134 100644 --- a/pkgs/development/ocaml-modules/ppxlib/default.nix +++ b/pkgs/development/ocaml-modules/ppxlib/default.nix @@ -2,7 +2,7 @@ , version ? if lib.versionAtLeast ocaml.version "4.07" then if lib.versionAtLeast ocaml.version "4.08" - then "0.24.0" else "0.15.0" else "0.13.0" + then "0.28.0" else "0.15.0" else "0.13.0" , ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio , stdlib-shims, ocaml-migrate-parsetree-2 }: @@ -46,6 +46,10 @@ let param = { sha256 = "sha256-wuG7cUZiVP2PdM+nZloip7lGGiWn6Wpkh2YoF/Fuc9o="; min_version = "4.07"; }; + "0.28.0" = { + sha256 = "sha256-i/U++sosKQUjyxu9GscPb1Gfv2a3Hbmj+UgIZlewnCo="; + min_version = "4.07"; + }; }."${version}"; in if param ? max_version && lib.versionAtLeast ocaml.version param.max_version From 9413e94226fc2568f189b7a717d2b3abf735a430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 12:27:54 -0300 Subject: [PATCH 02/12] ocamlPackages.ppx_sexp_conv: 0.15.0 -> 0.15.1 --- pkgs/development/ocaml-modules/janestreet/0.14.nix | 2 +- pkgs/development/ocaml-modules/janestreet/0.15.nix | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/janestreet/0.14.nix b/pkgs/development/ocaml-modules/janestreet/0.14.nix index 68c633b800a6..67d0e6c7896e 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.14.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.14.nix @@ -613,7 +613,7 @@ with self; minimumOCamlVersion = "4.04.2"; hash = "0dbri9d00ydi0dw1cavswnqdmhjaaz80vap29ns2lr6mhhlvyjmj"; meta.description = "[@@deriving] plugin to generate S-expression conversion functions"; - propagatedBuildInputs = [ ppxlib sexplib0 base ]; + propagatedBuildInputs = [ (ppxlib.override { version = "0.24.0"; }) sexplib0 base ]; }; ppx_sexp_message = janePackage { diff --git a/pkgs/development/ocaml-modules/janestreet/0.15.nix b/pkgs/development/ocaml-modules/janestreet/0.15.nix index dcb5d62c362d..8bcccc075646 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.15.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.15.nix @@ -704,8 +704,9 @@ with self; ppx_sexp_conv = janePackage { pname = "ppx_sexp_conv"; - minimumOCamlVersion = "4.04.2"; - hash = "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"; + version = "0.15.1"; + minimalOCamlVersion = "4.08.0"; + hash = "sha256-NYknZHyDklr71hihM2pPFQ7uAKkuKO2DJkjtsF+xc5g="; meta.description = "[@@deriving] plugin to generate S-expression conversion functions"; propagatedBuildInputs = [ ppxlib sexplib0 base ]; }; From d66b2d9f0223e69560bd81694f291021490d581a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 22:02:50 -0300 Subject: [PATCH 03/12] ocamlPackages.sedlex: 2.5 -> 2.6 --- pkgs/development/ocaml-modules/sedlex/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix index e49f03d3f537..947896e8ef1e 100644 --- a/pkgs/development/ocaml-modules/sedlex/default.nix +++ b/pkgs/development/ocaml-modules/sedlex/default.nix @@ -27,7 +27,7 @@ let in buildDunePackage rec { pname = "sedlex"; - version = "2.5"; + version = "2.6"; minimalOCamlVersion = "4.08"; @@ -35,7 +35,7 @@ buildDunePackage rec { owner = "ocaml-community"; repo = "sedlex"; rev = "v${version}"; - sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"; + sha256 = "sha256-AU+dV+jTG9v3BXzip2Bnv04Ewyo3pyUglDDBFsOsFf0="; }; propagatedBuildInputs = [ From d2547fef54c9de3db95f390018e6147f083fb733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 22:19:18 -0300 Subject: [PATCH 04/12] ocamlPackages.ppx_deriving_yojson: 3.6.1 -> 3.7.0 --- .../ocaml-modules/ppx_deriving_yojson/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix index bef60b3f381c..eb06b40e618e 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix @@ -4,17 +4,15 @@ buildDunePackage rec { pname = "ppx_deriving_yojson"; - version = "3.6.1"; + version = "3.7.0"; - useDune2 = true; - - minimumOCamlVersion = "4.07"; + minimalOCamlVersion = "4.07"; src = fetchFromGitHub { owner = "ocaml-ppx"; repo = "ppx_deriving_yojson"; rev = "v${version}"; - sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"; + sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k="; }; propagatedBuildInputs = [ ppxlib ppx_deriving yojson ]; From b1e1e9cbb53007c66245db6675f2aca4342ab906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 22:23:59 -0300 Subject: [PATCH 05/12] ocamlPackages.ppx_import: add version 1.10.0 --- .../ocaml-modules/ppx_import/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_import/default.nix b/pkgs/development/ocaml-modules/ppx_import/default.nix index 192e7258c4c5..3a59b217e8f2 100644 --- a/pkgs/development/ocaml-modules/ppx_import/default.nix +++ b/pkgs/development/ocaml-modules/ppx_import/default.nix @@ -1,18 +1,29 @@ { lib , fetchurl , buildDunePackage +, ocaml , ounit , ppx_deriving , ppx_sexp_conv , ppxlib +, version ? if lib.versionAtLeast ocaml.version "4.11" then "1.10.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}" buildDunePackage rec { pname = "ppx_import"; - version = "1.9.1"; + inherit version; useDune2 = true; @@ -20,7 +31,7 @@ buildDunePackage rec { src = fetchurl { url = "https://github.com/ocaml-ppx/ppx_import/releases/download/${version}/ppx_import-${version}.tbz"; - sha256 = "1li1f9b1i0yhjy655k74hgzhd05palz726zjbhwcy3iqxvi9id6i"; + inherit (param) sha256; }; propagatedBuildInputs = [ From 8cd130f9f94aad1b7a4b489efb5c6ebb0b20dd57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 23:03:28 -0300 Subject: [PATCH 06/12] ocamlPackages.gen_js_api: 1.0.9 -> 1.1.1 --- pkgs/development/ocaml-modules/gen_js_api/default.nix | 4 ++-- pkgs/development/ocaml-modules/gen_js_api/ojs.nix | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/gen_js_api/default.nix b/pkgs/development/ocaml-modules/gen_js_api/default.nix index e0474cdac6a8..fa86c0e710bf 100644 --- a/pkgs/development/ocaml-modules/gen_js_api/default.nix +++ b/pkgs/development/ocaml-modules/gen_js_api/default.nix @@ -9,13 +9,13 @@ buildDunePackage rec { pname = "gen_js_api"; - version = "1.0.9"; + version = "1.1.1"; src = fetchFromGitHub { owner = "LexiFi"; repo = pname; rev = "v${version}"; - sha256 = "1qx6if1avr484bl9x1h0cksdc6gqw5i4pwzdr27h46hppnnvi8y8"; + sha256 = "sha256-0FKKYPbSBza/Q6oZniq/UHi5zBjD/i7j5ds3ZDWkBTs="; }; minimalOCamlVersion = "4.08"; diff --git a/pkgs/development/ocaml-modules/gen_js_api/ojs.nix b/pkgs/development/ocaml-modules/gen_js_api/ojs.nix index 722f9fa7f6e1..381fda7acd93 100644 --- a/pkgs/development/ocaml-modules/gen_js_api/ojs.nix +++ b/pkgs/development/ocaml-modules/gen_js_api/ojs.nix @@ -1,5 +1,6 @@ { buildDunePackage , gen_js_api +, js_of_ocaml-compiler }: buildDunePackage rec { @@ -7,6 +8,8 @@ buildDunePackage rec { inherit (gen_js_api) version src; + propagatedBuildInputs = [ js_of_ocaml-compiler ]; + doCheck = false; # checks depend on gen_js_api, which is a cycle minimalOCamlVersion = "4.08"; From af1902560395f6f7fcb0283794127ed66e5d31a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 20 Oct 2022 09:35:20 -0300 Subject: [PATCH 07/12] ocamlPackages.piqi: 0.6.15 -> 0.6.16 --- pkgs/development/ocaml-modules/piqi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index f9eb09987fb9..ec8231285827 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex, easy-format, xmlm, base64 }: stdenv.mkDerivation rec { - version = "0.6.15"; + version = "0.6.16"; pname = "piqi"; name = "ocaml${ocaml.version}-${pname}-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { owner = "alavrik"; repo = pname; rev = "v${version}"; - sha256 = "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"; + sha256 = "sha256-qE+yybTn+kzbY0h8udhZYO+GwQPI/J/6p3LMmF12cFU="; }; nativeBuildInputs = [ ocaml findlib which ]; From 3a669e05fde40fdf274f5a01796aa3a376e1eec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 20 Oct 2022 09:36:02 -0300 Subject: [PATCH 08/12] ocamlpackages.piqi-ocaml: 0.7.7 -> 0.7.8 --- pkgs/development/ocaml-modules/piqi-ocaml/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix index 39869765349b..09f2bd351837 100644 --- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims, num }: stdenv.mkDerivation rec { - version = "0.7.7"; + version = "0.7.8"; pname = "piqi-ocaml"; name = "ocaml${ocaml.version}-${pname}-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { owner = "alavrik"; repo = pname; rev = "v${version}"; - sha256 = "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"; + sha256 = "sha256-6Luq49sbo+AqLSq57mc6fLhrRx0K6G5LCUIzkGPfqYo="; }; nativeBuildInputs = [ ocaml findlib ]; From c486b14861116a214c0d72eb7fba17e95dd3f9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 23 Oct 2022 11:23:25 -0300 Subject: [PATCH 09/12] ocamlPackages.ppx_deriving_cmdliner: compatibility with ppxlib-0.26 --- .../ocaml-modules/ppx_deriving_cmdliner/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix index 195b53a5fe12..3350181dda45 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix @@ -1,6 +1,7 @@ { lib , buildDunePackage , fetchFromGitHub +, fetchpatch , alcotest , cmdliner , ppx_deriving @@ -20,6 +21,15 @@ buildDunePackage rec { sha256 = "sha256-/22KLQnxu3e2ZSca6ZLxTJDfv/rsmgCUkJnZC0RwRi8"; }; + patches = [ + # Ppxlib.0.26.0 compatibility + # remove when a new version is released + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/hammerlab/ppx_deriving_cmdliner/pull/50.patch"; + sha256 = "sha256-FfUfEAsyobwZ99+s5sFAaCE6Xgx7jLr/q79OxDbGcvQ="; + }) + ]; + propagatedBuildInputs = [ cmdliner ppx_deriving From ab89457dd110f7582336e7717121de78e926e2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 11 Oct 2022 22:02:02 -0300 Subject: [PATCH 10/12] ocamlPackages.bisect_ppx: compatibility with ppxlib-0.28 --- .../ocaml-modules/bisect_ppx/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/pkgs/development/ocaml-modules/bisect_ppx/default.nix index fdfc61e73c34..6f54163a40fa 100644 --- a/pkgs/development/ocaml-modules/bisect_ppx/default.nix +++ b/pkgs/development/ocaml-modules/bisect_ppx/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildDunePackage, cmdliner, ppxlib }: +{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, cmdliner, ppxlib }: buildDunePackage rec { pname = "bisect_ppx"; @@ -11,6 +11,21 @@ buildDunePackage rec { sha256 = "sha256-pOeeSxzUF1jXQjA71atSZALdgQ2NB9qpKo5iaDnPwhQ="; }; + patches = [ + # Ppxlib >= 0.26.0 compatibility + # remove when a new version is released + (fetchpatch { + name = "${pname}-${version}-ppxlib-0.26-compatibility.patch"; + url = "https://patch-diff.githubusercontent.com/raw/aantron/bisect_ppx/pull/400.patch"; + sha256 = "sha256-WAn6+d6pMUr79LVugOENuh9s0gbVEcTg0rxXMz1P3ak="; + }) + (fetchpatch { + name = "${pname}-${version}-ppxlib-0.28-compatibility.patch"; + url = "https://github.com/anmonteiro/bisect_ppx/commit/cc442a08e3a2e0e18deb48f3a696076ac0986728.patch"; + sha256 = "sha256-pPHhmtd81eWhQd4X0gfZNPYT75+EkurwivP7acfJbNc="; + }) + ]; + minimumOCamlVersion = "4.08"; useDune2 = true; From 15b6e9efd4f4f7a2f0d530f102edd2f07f787d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 23 Oct 2022 12:17:56 -0300 Subject: [PATCH 11/12] fstar: do not use ppxlib >= 0.26 See https://github.com/FStarLang/FStar/issues/2681 When a fix is availabe, this work around should be removed. --- pkgs/top-level/all-packages.nix | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d56fca00178..e4f5dc76582e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14211,7 +14211,37 @@ with pkgs; fsharp = callPackage ../development/compilers/fsharp { }; - fstar = callPackage ../development/compilers/fstar { }; + fstar = callPackage ../development/compilers/fstar { + # Work around while compatibility with ppxlib >= 0.26 is unavailable + # Should be removed when a fix is availaible + # See https://github.com/FStarLang/FStar/issues/2681 + ocamlPackages = + ocamlPackages.overrideScope' (self: super: { + ppxlib = super.ppxlib.override { + version = if lib.versionAtLeast self.ocaml.version "4.07" + then if lib.versionAtLeast self.ocaml.version "4.08" + then "0.24.0" else "0.15.0" else "0.13.0"; + }; + ppx_deriving_yojson = super.ppx_deriving_yojson.overrideAttrs (oldAttrs: rec { + version = "3.6.1"; + src = fetchFromGitHub { + owner = "ocaml-ppx"; + repo = "ppx_deriving_yojson"; + rev = "v${version}"; + sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"; + }; + }); + sedlex = super.sedlex.overrideAttrs (oldAttrs: rec { + version = "2.5"; + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "sedlex"; + rev = "v${version}"; + sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"; + }; + }); + }); + }; dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {}); From d6c30bbf704122ac71f29b5db4a707e5948a81fb Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 9 Nov 2022 20:41:22 +0100 Subject: [PATCH 12/12] =?UTF-8?q?ppxlib:=20default=20to=200.28.0=20for=20O?= =?UTF-8?q?Caml=20=E2=89=A5=204.11=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/bisect_ppx/default.nix | 5 ++--- .../ocaml-modules/gen_js_api/default.nix | 2 +- .../ppx_deriving_cmdliner/default.nix | 2 +- .../ocaml-modules/ppx_deriving_yojson/default.nix | 14 ++++++++++++-- pkgs/development/ocaml-modules/ppxlib/default.nix | 3 ++- pkgs/development/ocaml-modules/sedlex/default.nix | 14 ++++++++++++-- 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 6f54163a40fa..4ecfea79e155 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 fa86c0e710bf..4baa21c57cf1 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 3350181dda45..e432e5f963ed 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 eb06b40e618e..4fef3c0619f3 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 48f4128f2134..92090c244142 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 947896e8ef1e..a6a7604208ab 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 = [