diff --git a/pkgs/development/ocaml-modules/janestreet/ppx_core-113_33_01.nix b/pkgs/development/ocaml-modules/janestreet/ppx_core-113_33_01.nix new file mode 100644 index 00000000000..71bc62937d4 --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/ppx_core-113_33_01.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg +, ppx_tools +}: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ppx_core-133.33.01+4.03"; + src = fetchurl { + url = http://ocaml.janestreet.com/ocaml-core/113.33/files/ppx_core-113.33.01+4.03.tar.gz; + sha256 = "0ibww4lx87lmn164mxczl3sa7ldwc7g1zi4m9c4vllsv004iyffl"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opam ppx_tools ]; + + 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 ebc09ecc84f..d955f284914 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -554,7 +554,10 @@ let buildOcamlJane = callPackage ../development/ocaml-modules/janestreet/buildOcamlJane.nix {}; - ppx_core = callPackage ../development/ocaml-modules/janestreet/ppx-core.nix {}; + ppx_core = + if lib.versionOlder "4.03" ocaml.version + then callPackage ../development/ocaml-modules/janestreet/ppx_core-113_33_01.nix {} + else callPackage ../development/ocaml-modules/janestreet/ppx-core.nix {}; ppx_optcomp = callPackage ../development/ocaml-modules/janestreet/ppx-optcomp.nix {};