diff --git a/pkgs/development/ocaml-modules/janestreet/ppx_type_conv-113_33_02.nix b/pkgs/development/ocaml-modules/janestreet/ppx_type_conv-113_33_02.nix new file mode 100644 index 00000000000..49cfc19321d --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/ppx_type_conv-113_33_02.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg +, ppx_core, ppx_deriving, ppx_driver +}: + +stdenv.mkDerivation { + name = "ocaml${ocaml.version}-ppx_type_conv-133.33.02+4.03"; + src = fetchurl { + url = http://ocaml.janestreet.com/ocaml-core/113.33/files/ppx_type_conv-113.33.02+4.03.tar.gz; + sha256 = "0y7hsh152gcj89i6cr3b9kxgdnb2sx8vhaq2bdvbcc9zrirwq4d2"; + }; + + buildInputs = [ ocaml findlib ocamlbuild opam ppx_deriving ]; + propagatedBuildInputs = [ ppx_core ppx_driver ]; + + 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 218cb12e69e..09443b93db0 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -567,7 +567,10 @@ let ppx_driver = callPackage ../development/ocaml-modules/janestreet/ppx-driver.nix {}; - ppx_type_conv = callPackage ../development/ocaml-modules/janestreet/ppx-type-conv.nix {}; + ppx_type_conv = + if lib.versionOlder "4.03" ocaml.version + then callPackage ../development/ocaml-modules/janestreet/ppx_type_conv-113_33_02.nix { } + else callPackage ../development/ocaml-modules/janestreet/ppx-type-conv.nix {}; ppx_compare = callPackage ../development/ocaml-modules/janestreet/ppx-compare.nix {};