diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix index 6e0fa39a0acf..edccd29a0ab1 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix @@ -1,14 +1,17 @@ -{ lib, buildDunePackage, fetchFromGitHub, ocaml, ppxlib, ounit -, ppx_deriving, yojson +{ lib, buildDunePackage, fetchFromGitHub, ocaml, ppxlib, ounit, ounit2 +, ppx_deriving, result, yojson }: let param = - if lib.versionAtLeast ppxlib.version "0.26" then { - version = "3.7.0"; - sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k="; + if lib.versionAtLeast ppxlib.version "0.30" then { + version = "3.9.0"; + sha256 = "sha256-0d6YcBkeFoHXffCYjLIIvruw8B9ZB6NbUijhTv9uyN8="; + checkInputs = [ ounit2 ]; } else { version = "3.6.1"; sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk"; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ result ]; } ; in @@ -25,10 +28,11 @@ buildDunePackage rec { inherit (param) sha256; }; - propagatedBuildInputs = [ ppxlib ppx_deriving yojson ]; + propagatedBuildInputs = [ ppxlib ppx_deriving yojson ] + ++ param.propagatedBuildInputs or []; doCheck = lib.versionAtLeast ocaml.version "4.08"; - checkInputs = [ ounit ]; + inherit (param) checkInputs; meta = { description = "Yojson codec generator for OCaml >= 4.04";