1 { stdenv, lib, fetchurl, pkg-config, which, ncurses, ocaml, findlib, ocaml_pcre, camlzip
5 lib.throwIf (lib.versionOlder ocaml.version "4.02" || lib.versionAtLeast ocaml.version "5.0")
6 "ocamlnet is not available for OCaml ${ocaml.version}"
8 stdenv.mkDerivation rec {
9 pname = "ocaml${ocaml.version}-ocamlnet";
13 url = "http://download.camlcity.org/download/ocamlnet-${version}.tar.gz";
14 sha256 = "1vlwxjxr946gdl61a1d7yk859cijq45f60dhn54ik3w4g6cx33pr";
17 nativeBuildInputs = [ pkg-config which ocaml findlib ];
18 buildInputs = [ ncurses ocaml_pcre camlzip gnutls nettle ];
22 createFindlibDestdir = true;
25 dontAddStaticConfigureFlags = true;
26 configurePlatforms = [];
36 -datadir $out/lib/ocaml/${ocaml.version}/ocamlnet
46 homepage = "http://projects.camlcity.org/projects/ocamlnet.html";
47 description = "Library implementing Internet protocols (http, cgi, email, etc.) for OCaml";
48 license = "Most Ocamlnet modules are released under the zlib/png license. The HTTP server module Nethttpd is, however, under the GPL.";
49 inherit (ocaml.meta) platforms;
51 lib.maintainers.maggesi