2014-10-10 15:32:06 +00:00
|
|
|
{stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}:
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
|
|
|
pname = "ocaml-http";
|
|
|
|
version = "0.1.3";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://upsilon.cc/~zack/hacking/software/${pname}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "070xw033r4pk6f4l0wcknm75y9qm4mp622a4cgzmcfhm58v6kssn";
|
|
|
|
};
|
|
|
|
|
2014-10-10 15:32:06 +00:00
|
|
|
buildInputs = [ocaml_pcre ocamlnet ocaml findlib camlp4];
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
BASH=$(type -tp bash)
|
|
|
|
echo $BASH
|
|
|
|
substituteInPlace Makefile --replace "SHELL=/bin/bash" "SHELL=$BASH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = "true"; # Skip configure phase
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make all opt
|
|
|
|
'';
|
|
|
|
|
2014-10-10 15:32:06 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-12-31 17:48:55 +00:00
|
|
|
homepage = "http://upsilon.cc/~zack/hacking/software/ocaml-http/";
|
|
|
|
description = "do it yourself (OCaml) HTTP daemon";
|
2014-10-10 15:32:06 +00:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ roconnor vbgl ];
|
2010-12-31 17:48:55 +00:00
|
|
|
};
|
|
|
|
}
|