Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 39 lines 1.0 kB view raw
1{stdenv, fetchurl, ocaml_pcre, ocamlnet, ocaml, findlib, camlp4}: 2 3if stdenv.lib.versionAtLeast ocaml.version "4.06" 4then throw "ocaml-http is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation { 8 name = "ocaml-http-0.1.5"; 9 10 src = fetchurl { 11 url = https://forge.ocamlcore.org/frs/download.php/545/ocaml-http-0.1.5.tar.gz; 12 sha256 = "09q12b0j01iymflssxigsqggbsp8dqh9pfvkm76dv860544mygws"; 13 }; 14 15 buildInputs = [ocaml findlib camlp4]; 16 propagatedBuildInputs = [ocaml_pcre ocamlnet]; 17 18 createFindlibDestdir = true; 19 20 prePatch = '' 21 BASH=$(type -tp bash) 22 echo $BASH 23 substituteInPlace Makefile --replace "SHELL=/bin/bash" "SHELL=$BASH" 24 ''; 25 26 configurePhase = "true"; # Skip configure phase 27 28 buildPhase = '' 29 make all opt 30 ''; 31 32 meta = with stdenv.lib; { 33 homepage = http://ocaml-http.forge.ocamlcore.org/; 34 platforms = ocaml.meta.platforms or []; 35 description = "Do it yourself (OCaml) HTTP daemon"; 36 license = licenses.lgpl2; 37 maintainers = with maintainers; [ roconnor vbgl ]; 38 }; 39}