diff --git a/pkgs/development/ocaml-modules/janestreet/ppx_expect-113_33_01.nix b/pkgs/development/ocaml-modules/janestreet/ppx_expect-113_33_01.nix new file mode 100644 index 00000000000..32133dfb689 --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/ppx_expect-113_33_01.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg +, ppx_driver, ppx_assert, ppx_custom_printf, ppx_inline_test +, ppx_fields_conv, ppx_variants_conv, re, sexplib, fieldslib +}: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ppx_expect-113.33.01+4.03"; + src = fetchurl { + url = http://ocaml.janestreet.com/ocaml-core/113.33/files/ppx_expect-113.33.01+4.03.tar.gz; + sha256 = "1r358vx3wnkzq8kwgi49400l1fx2bnl6gds4hl7s67lxsqxki2z7"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opam ppx_assert ppx_custom_printf ppx_fields_conv ppx_variants_conv re ]; + propagatedBuildInputs = [ ppx_driver ppx_inline_test fieldslib sexplib ]; + + 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 d393233181d..2dff5031f6f 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -627,7 +627,10 @@ let then callPackage ../development/ocaml-modules/janestreet/ppx_variants_conv-113_33_00.nix {} else callPackage ../development/ocaml-modules/janestreet/ppx-variants-conv.nix {}; - ppx_expect = callPackage ../development/ocaml-modules/janestreet/ppx-expect.nix {}; + ppx_expect = + if lib.versionOlder "4.03" ocaml.version + then callPackage ../development/ocaml-modules/janestreet/ppx_expect-113_33_01.nix {} + else callPackage ../development/ocaml-modules/janestreet/ppx-expect.nix {}; ppx_jane = callPackage ../development/ocaml-modules/janestreet/ppx-jane.nix {};