diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 493ec7f3f51..7d9a0573db7 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -2,10 +2,13 @@ , gnutls, nettle }: -let version = "4.1.7"; in +if stdenv.lib.versionOlder ocaml.version "4.02" +then throw "ocamlnet is not available for OCaml ${ocaml.version}" +else -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-ocamlnet-${version}"; + version = "4.1.7"; src = fetchurl { url = "http://download.camlcity.org/download/ocamlnet-${version}.tar.gz";