diff --git a/pkgs/development/ocaml-modules/janestreet/ppx_fail-113_33_00.nix b/pkgs/development/ocaml-modules/janestreet/ppx_fail-113_33_00.nix new file mode 100644 index 000000000000..ba098b9294f6 --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/ppx_fail-113_33_00.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg +, ppx_tools, ppx_here +}: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ppx_fail-113.33.00+4.03"; + src = fetchurl { + url = http://ocaml.janestreet.com/ocaml-core/113.33/files/ppx_fail-113.33.00+4.03.tar.gz; + sha256 = "1fy1aqsylf6yk527w13rm2b20il9vy026c5ww65pj3ks5zykfvx9"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opam ppx_tools ]; + propagatedBuildInputs = [ ppx_here ]; + + inherit (topkg) installPhase; + + meta = { + license = stdenv.lib.licenses.asl20; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2dff5031f6f7..8cf09dc6ad34 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -605,7 +605,10 @@ let then callPackage ../development/ocaml-modules/janestreet/ppx_enumerate-113_33_00.nix {} else callPackage ../development/ocaml-modules/janestreet/ppx-enumerate.nix {}; - ppx_fail = callPackage ../development/ocaml-modules/janestreet/ppx-fail.nix {}; + ppx_fail = + if lib.versionOlder "4.03" ocaml.version + then callPackage ../development/ocaml-modules/janestreet/ppx_fail-113_33_00.nix {} + else callPackage ../development/ocaml-modules/janestreet/ppx-fail.nix {}; ppx_fields_conv = if lib.versionOlder "4.03" ocaml.version