at v192 50 lines 1.3 kB view raw
1{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl, cryptokit }: 2 3let 4 ocaml_version = (builtins.parseDrvName ocaml.name).version; 5in 6 7stdenv.mkDerivation { 8 name = "ocamlnet-3.7.7"; 9 10 src = fetchurl { 11 url = http://download.camlcity.org/download/ocamlnet-3.7.7.tar.gz; 12 sha256 = "02bnks9jshpq9nqva5lky5hl009yp19cgvf1izjca620hx54d3jv"; 13 }; 14 15 buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl cryptokit]; 16 17 propagatedbuildInputs = [ncurses ocaml_pcre camlzip openssl ocaml_ssl cryptokit]; 18 19 createFindlibDestdir = true; 20 21 dontAddPrefix = true; 22 23 preConfigure = '' 24 configureFlagsArray=( 25 -bindir $out/bin 26 -enable-ssl 27 -enable-zip 28 -enable-pcre 29 -enable-crypto 30 -disable-gtk2 31 -with-nethttpd 32 -datadir $out/lib/ocaml/${ocaml_version}/ocamlnet 33 ) 34 ''; 35 36 buildPhase = '' 37 make all 38 make opt 39 ''; 40 41 meta = { 42 homepage = http://projects.camlcity.org/projects/ocamlnet.html; 43 description = "A library implementing Internet protocols (http, cgi, email, etc.) for OCaml"; 44 license = "Most Ocamlnet modules are released under the zlib/png license. The HTTP server module Nethttpd is, however, under the GPL."; 45 platforms = ocaml.meta.platforms; 46 maintainers = [ 47 stdenv.lib.maintainers.z77z 48 ]; 49 }; 50}