2014-10-10 17:32:06 +02:00
|
|
|
{stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}:
|
2010-12-31 18:48:55 +01:00
|
|
|
|
2018-05-09 17:56:27 +02:00
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.06"
|
|
|
|
then throw "ocaml-http is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2010-12-31 18:48:55 +01:00
|
|
|
stdenv.mkDerivation {
|
2014-11-08 08:20:28 +01:00
|
|
|
name = "ocaml-http-0.1.5";
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-11-08 08:20:28 +01:00
|
|
|
url = https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz;
|
|
|
|
sha256 = "09q12b0j01iymflssxigsqggbsp8dqh9pfvkm76dv860544mygws";
|
2010-12-31 18:48:55 +01:00
|
|
|
};
|
|
|
|
|
2014-11-08 08:20:28 +01:00
|
|
|
buildInputs = [ocaml findlib camlp4];
|
|
|
|
propagatedBuildInputs = [ocaml_pcre ocamlnet];
|
2010-12-31 18:48:55 +01: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 17:32:06 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-08 08:20:28 +01:00
|
|
|
homepage = http://ocaml-http.forge.ocamlcore.org/;
|
2015-12-24 18:49:07 +01:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Do it yourself (OCaml) HTTP daemon";
|
2014-10-10 17:32:06 +02:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ roconnor vbgl ];
|
2010-12-31 18:48:55 +01:00
|
|
|
};
|
|
|
|
}
|