2019-01-14 22:51:56 +00:00
|
|
|
{ stdenv, fetchFromGitHub, which, ocaml, findlib, lwt_react, ssl, lwt_ssl
|
|
|
|
, lwt_log, ocamlnet, ocaml_pcre, cryptokit, tyxml, xml-light, ipaddr
|
|
|
|
, pgocaml, camlzip, ocaml_sqlite3
|
|
|
|
, makeWrapper
|
2015-09-16 17:08:57 +01:00
|
|
|
}:
|
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "ocsigenserver is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2015-09-16 17:08:57 +01:00
|
|
|
let mkpath = p: n:
|
2019-01-14 22:51:56 +00:00
|
|
|
"${p}/lib/ocaml/${ocaml.version}/site-lib/${n}";
|
2015-09-16 17:08:57 +01:00
|
|
|
in
|
2014-06-08 11:13:31 +01:00
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2.11.0";
|
|
|
|
name = "ocsigenserver-${version}";
|
2015-05-15 15:35:42 +01:00
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "ocsigenserver";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0y1ngki7w9s10ip7nj9qb7254bd5sp01xxz16sxyj7l7qz603hy2";
|
2014-06-08 11:13:31 +01:00
|
|
|
};
|
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
buildInputs = [ which makeWrapper ocaml findlib
|
|
|
|
lwt_react pgocaml camlzip ocaml_sqlite3
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cryptokit ipaddr lwt_log lwt_ssl ocamlnet
|
|
|
|
ocaml_pcre tyxml xml-light
|
|
|
|
];
|
2014-06-08 11:13:31 +01:00
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
configureFlags = [ "--root $(out)" "--prefix /" ];
|
2014-06-08 11:13:31 +01:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2015-05-15 15:35:42 +01:00
|
|
|
postFixup =
|
2014-06-08 11:13:31 +01:00
|
|
|
''
|
|
|
|
rm -rf $out/var/run
|
2015-09-16 17:08:57 +01:00
|
|
|
wrapProgram $out/bin/ocsigenserver \
|
2019-01-14 22:51:56 +00:00
|
|
|
--prefix CAML_LD_LIBRARY_PATH : "${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath cryptokit "cryptokit"}:${mkpath ocaml_sqlite3 "sqlite3"}"
|
2014-06-08 11:13:31 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://ocsigen.org/ocsigenserver/;
|
2014-09-06 11:45:20 +01:00
|
|
|
description = "A full featured Web server";
|
2014-09-06 09:44:20 +01:00
|
|
|
longDescription =''
|
|
|
|
A full featured Web server. It implements most features of the HTTP protocol, and has a very powerful extension mechanism that make very easy to plug your own OCaml modules for generating pages.
|
|
|
|
'';
|
2014-09-18 11:37:49 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-06-08 11:13:31 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.gal_bolle ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|