2021-01-11 07:54:33 +00:00
|
|
|
{lib, stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}:
|
2010-12-31 17:48:55 +00:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.06"
|
2018-05-09 15:56:27 +00:00
|
|
|
then throw "ocaml-http is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2010-12-31 17:48:55 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-11-08 07:20:28 +00:00
|
|
|
name = "ocaml-http-0.1.5";
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz";
|
2014-11-08 07:20:28 +00:00
|
|
|
sha256 = "09q12b0j01iymflssxigsqggbsp8dqh9pfvkm76dv860544mygws";
|
2010-12-31 17:48:55 +00:00
|
|
|
};
|
|
|
|
|
2014-11-08 07:20:28 +00:00
|
|
|
buildInputs = [ocaml findlib camlp4];
|
|
|
|
propagatedBuildInputs = [ocaml_pcre ocamlnet];
|
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"
|
|
|
|
'';
|
|
|
|
|
2019-06-19 15:36:06 +00:00
|
|
|
dontConfigure = true; # Skip configure phase
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make all opt
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://ocaml-http.forge.ocamlcore.org/";
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2016-06-20 10:53:46 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|