diff --git a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/2.x.nix b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/2.x.nix index 0d127d791524..1ba2976bcc54 100644 --- a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/2.x.nix +++ b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/2.x.nix @@ -1,4 +1,7 @@ -{ lib, fetchurl, buildDunePackage }: +{ lib, fetchurl, buildDunePackage, ocaml }: + +lib.throwIf (lib.versionAtLeast ocaml.version "5.1") + "ocaml-migrate-parsetree is not available for OCaml ${ocaml.version}" buildDunePackage rec { pname = "ocaml-migrate-parsetree";