diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix index f04c3b1fe253..4412f568508c 100644 --- a/pkgs/development/ocaml-modules/elpi/default.nix +++ b/pkgs/development/ocaml-modules/elpi/default.nix @@ -1,5 +1,7 @@ { stdenv, lib, fetchzip, buildDunePackage, camlp5 -, ppxlib, ppx_deriving, re, perl, ncurses +, re, perl, ncurses +, ppxlib, ppx_deriving +, ppxlib_0_15, ppx_deriving_0_15 , version ? "1.13.7" }: with lib; @@ -23,7 +25,11 @@ buildDunePackage rec { buildInputs = [ perl ncurses ]; - propagatedBuildInputs = [ camlp5 ppxlib ppx_deriving re ]; + propagatedBuildInputs = [ camlp5 re ] + ++ (if lib.versionAtLeast version "1.13" + then [ ppxlib ppx_deriving ] + else [ ppxlib_0_15 ppx_deriving_0_15 ] + ); meta = { description = "Embeddable λProlog Interpreter"; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 8a4408260042..74691f1df2d2 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -344,8 +344,8 @@ let then ppxlib.override { version = "0.15.0"; } else ppxlib; in { - ppx_deriving = ppx_deriving.override { ppxlib = ppxlib_0_15; }; - ppxlib = ppxlib_0_15; + ppx_deriving_0_15 = ppx_deriving.override { ppxlib = ppxlib_0_15; }; + inherit ppxlib_0_15; } );