From 9a67ee8a4940f022a44a8fd31ef798533fe46545 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 12 Nov 2024 08:32:11 +0100 Subject: [PATCH 1/2] ocamlPackages.ppx_deriving_cmdliner: add missing dependency result --- .../ocaml-modules/ppx_deriving_cmdliner/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix index f5d769efcfd6..d956856327f0 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix @@ -6,6 +6,7 @@ , cmdliner , ppx_deriving , ppxlib +, result , gitUpdater }: @@ -14,7 +15,6 @@ buildDunePackage rec { version = "0.6.1"; minimalOCamlVersion = "4.11"; - duneVersion = "3"; src = fetchFromGitHub { owner = "hammerlab"; @@ -36,6 +36,7 @@ buildDunePackage rec { cmdliner ppx_deriving ppxlib + result ]; doCheck = true; From 23bb0ee13f5ba79fc9a30c2d783239d43e7a1bcb Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 12 Nov 2024 08:32:16 +0100 Subject: [PATCH 2/2] =?UTF-8?q?ocamlPackages.ppx=5Fderiving:=205.2.1=20?= =?UTF-8?q?=E2=86=92=206.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/ppx_deriving/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index 1e79e8a1ffa8..a2f002071748 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -13,7 +13,10 @@ }: let params = - if lib.versionAtLeast ppxlib.version "0.20" then { + if lib.versionAtLeast ppxlib.version "0.32" then { + version = "6.0.3"; + sha256 = "sha256-N0qpezLF4BwJqXgQpIv6IYwhO1tknkRSEBRVrBnJSm0="; + } else if lib.versionAtLeast ppxlib.version "0.20" then { version = "5.2.1"; sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9"; } else if lib.versionAtLeast ppxlib.version "0.15" then { @@ -30,7 +33,7 @@ buildDunePackage rec { inherit (params) version; src = fetchurl { - url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz"; + url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-${lib.optionalString (lib.versionOlder version "6.0") "v"}${version}.tbz"; inherit (params) sha256; }; @@ -41,11 +44,10 @@ buildDunePackage rec { propagatedBuildInputs = lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree ++ [ ppx_derivers - result - ]; + ] ++ lib.optional (lib.versionOlder version "6.0") result + ; - doCheck = lib.versionAtLeast ocaml.version "4.08" - && lib.versionOlder ocaml.version "5.0"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ (if lib.versionAtLeast version "5.2" then ounit2 else ounit) ];