diff --git a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix index b4e06d3c999..a7c32a069fc 100644 --- a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, opam, ocurl, cryptokit, ocaml_extlib, yojson, ocamlnet, xmlm }: +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "gapi-ocaml is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation rec { name = "gapi-ocaml-${version}"; version = "0.3.6"; diff --git a/pkgs/development/ocaml-modules/http/default.nix b/pkgs/development/ocaml-modules/http/default.nix index f25a6f97b39..b9b530ac599 100644 --- a/pkgs/development/ocaml-modules/http/default.nix +++ b/pkgs/development/ocaml-modules/http/default.nix @@ -1,5 +1,9 @@ {stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}: +if stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "ocaml-http is not available for OCaml ${ocaml.version}" +else + stdenv.mkDerivation { name = "ocaml-http-0.1.5"; diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 492bb9c67cd..33f32879211 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -1,23 +1,17 @@ { stdenv, fetchurl, pkgconfig, ncurses, ocaml, findlib, ocaml_pcre, camlzip -, gnutls, nettle, fetchpatch +, gnutls, nettle }: -let version = "4.1.5"; in +let version = "4.1.6"; in stdenv.mkDerivation { name = "ocaml${ocaml.version}-ocamlnet-${version}"; src = fetchurl { url = "http://download.camlcity.org/download/ocamlnet-${version}.tar.gz"; - sha256 = "1ppcd2zjhj6s3ib9q8dngnr53qlmkhvv7a8hzp88r79k6jygn4cm"; + sha256 = "1j0k0drybcjpysvs8xpq3cnpg3wqk6d5sy7y1h5rq8jk7hrirf0k"; }; - patches = [ (fetchpatch { - url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocamlnet/ocamlnet.4.1.5/files/netgzip.patch"; - sha256 = "1say7zzgk24qcy9m91gcfgvz4fv7nksx4j5qnbxyq8wqw0g88ba0"; - }) - ]; - nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ncurses ocaml findlib ocaml_pcre camlzip gnutls nettle ]; diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix index e5533d3ad4b..fb3b67b03b7 100644 --- a/pkgs/development/ocaml-modules/pcre/default.nix +++ b/pkgs/development/ocaml-modules/pcre/default.nix @@ -1,21 +1,19 @@ -{stdenv, buildOcaml, fetchurl, pcre, ocaml, findlib}: +{ stdenv, fetchurl, pcre, ocaml, findlib, ocamlbuild }: -buildOcaml { - name = "pcre"; +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-pcre-${version}"; version = "7.2.3"; src = fetchurl { - url = "https://github.com/mmottl/pcre-ocaml/releases/download/v7.2.3/pcre-ocaml-7.2.3.tar.gz"; + url = "https://github.com/mmottl/pcre-ocaml/releases/download/v${version}/pcre-ocaml-${version}.tar.gz"; sha256 = "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"; }; - buildInputs = [ocaml findlib]; + buildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [pcre]; createFindlibDestdir = true; - hasSharedObjects = true; - configurePhase = "true"; # Skip configure phase meta = with stdenv.lib; {