diff --git a/pkgs/development/ocaml-modules/lens/default.nix b/pkgs/development/ocaml-modules/lens/default.nix index 4a9706b4ba83..c26b3dbe7374 100644 --- a/pkgs/development/ocaml-modules/lens/default.nix +++ b/pkgs/development/ocaml-modules/lens/default.nix @@ -1,4 +1,8 @@ -{ lib, fetchzip, ppx_deriving, ppxfind, buildDunePackage }: +{ lib, ocaml, fetchzip, ppx_deriving, ppxfind, buildDunePackage }: + +if lib.versionAtLeast ocaml.version "4.10" +then throw "lens is not available for OCaml ${ocaml.version}" +else buildDunePackage rec { pname = "lens";