diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 22cd84da1f8..c650155ff38 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -2,9 +2,8 @@ , gnutls, nettle }: -if lib.versionOlder ocaml.version "4.02" -then throw "ocamlnet is not available for OCaml ${ocaml.version}" -else +lib.throwIf (lib.versionOlder ocaml.version "4.02" || lib.versionAtLeast ocaml.version "5.0") + "ocamlnet is not available for OCaml ${ocaml.version}" stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-ocamlnet";