2022-03-01 15:42:22 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildDunePackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
which,
|
|
|
|
ocaml,
|
|
|
|
lwt_react,
|
|
|
|
ssl,
|
|
|
|
lwt_ssl,
|
|
|
|
findlib,
|
2021-08-01 08:53:09 +00:00
|
|
|
bigstringaf,
|
|
|
|
lwt,
|
|
|
|
cstruct,
|
|
|
|
mirage-crypto,
|
|
|
|
zarith,
|
|
|
|
mirage-crypto-ec,
|
|
|
|
ptime,
|
|
|
|
mirage-crypto-rng,
|
|
|
|
mtime,
|
|
|
|
ca-certs,
|
2024-09-09 04:37:36 +00:00
|
|
|
cohttp,
|
|
|
|
cohttp-lwt-unix,
|
2023-10-02 19:27:33 +00:00
|
|
|
lwt_log,
|
|
|
|
re,
|
|
|
|
cryptokit,
|
|
|
|
xml-light,
|
|
|
|
ipaddr,
|
2022-03-30 04:53:09 +00:00
|
|
|
camlzip,
|
2021-05-19 09:09:43 +00:00
|
|
|
makeWrapper,
|
2015-09-16 16:08:57 +00:00
|
|
|
}:
|
|
|
|
|
2021-08-01 08:53:09 +00:00
|
|
|
let
|
|
|
|
mkpath = p: "${p}/lib/ocaml/${ocaml.version}/site-lib/stublibs";
|
2015-09-16 16:08:57 +00:00
|
|
|
in
|
2014-06-08 10:13:31 +00:00
|
|
|
|
2021-08-01 08:53:09 +00:00
|
|
|
let
|
|
|
|
caml_ld_library_path = lib.concatMapStringsSep ":" mkpath [
|
2023-10-02 19:27:33 +00:00
|
|
|
bigstringaf
|
|
|
|
lwt
|
|
|
|
ssl
|
|
|
|
cstruct
|
|
|
|
mirage-crypto
|
|
|
|
zarith
|
|
|
|
mirage-crypto-ec
|
|
|
|
ptime
|
|
|
|
mirage-crypto-rng
|
|
|
|
mtime
|
|
|
|
ca-certs
|
|
|
|
cryptokit
|
|
|
|
re
|
2021-08-01 08:53:09 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
2024-09-09 04:37:36 +00:00
|
|
|
version = "6.0.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "ocsigenserver";
|
2015-05-15 14:35:42 +00:00
|
|
|
|
2021-08-01 08:53:09 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
|
|
|
|
2019-01-14 22:51:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "ocsigenserver";
|
2023-10-02 19:27:33 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-09-09 04:37:36 +00:00
|
|
|
hash = "sha256-T3bgPZpDO6plgebLJDBtBuR2eR/bN3o24UAUv1VwgtI=";
|
2014-06-08 10:13:31 +00:00
|
|
|
};
|
|
|
|
|
2021-08-01 08:53:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
which
|
|
|
|
];
|
2022-03-01 15:42:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
lwt_react
|
|
|
|
camlzip
|
|
|
|
findlib
|
|
|
|
];
|
2019-01-14 22:51:56 +00:00
|
|
|
|
2024-09-09 04:37:36 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cohttp
|
|
|
|
cohttp-lwt-unix
|
|
|
|
cryptokit
|
|
|
|
ipaddr
|
|
|
|
lwt_log
|
|
|
|
lwt_ssl
|
2023-10-02 19:27:33 +00:00
|
|
|
re
|
|
|
|
xml-light
|
2019-01-14 22:51:56 +00:00
|
|
|
];
|
2014-06-08 10:13:31 +00:00
|
|
|
|
2022-02-03 06:20:04 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--root $(out)"
|
|
|
|
"--prefix /"
|
|
|
|
"--temproot ''"
|
|
|
|
];
|
2014-06-08 10:13:31 +00:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
2021-08-14 12:00:00 +00:00
|
|
|
dontAddStaticConfigureFlags = true;
|
|
|
|
configurePlatforms = [ ];
|
2014-06-08 10:13:31 +00:00
|
|
|
|
2021-08-01 08:53:09 +00:00
|
|
|
postConfigure = ''
|
|
|
|
make -C src confs
|
|
|
|
'';
|
2014-06-08 10:13:31 +00:00
|
|
|
|
2022-02-03 06:20:04 +00:00
|
|
|
postInstall = ''
|
|
|
|
make install.files
|
|
|
|
'';
|
|
|
|
|
2015-05-15 14:35:42 +00:00
|
|
|
postFixup = ''
|
2014-06-08 10:13:31 +00:00
|
|
|
rm -rf $out/var/run
|
2015-09-16 16:08:57 +00:00
|
|
|
wrapProgram $out/bin/ocsigenserver \
|
2021-08-01 08:53:09 +00:00
|
|
|
--suffix CAML_LD_LIBRARY_PATH : "${caml_ld_library_path}"
|
2014-06-08 10:13:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://ocsigen.org/ocsigenserver/";
|
2014-09-06 10:45:20 +00:00
|
|
|
description = "Full featured Web server";
|
2014-09-06 08:44:20 +00: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.
|
|
|
|
'';
|
2021-08-01 08:53:09 +00:00
|
|
|
license = lib.licenses.lgpl21Only;
|
2022-05-10 17:36:58 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-11 12:49:15 +00:00
|
|
|
maintainers = [ lib.maintainers.gal_bolle ];
|
2014-06-08 10:13:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|