ocamlPackages.ocsigen_server: 2.9 -> 2.11

This commit is contained in:
Vincent Laporte 2019-01-14 22:51:56 +00:00
parent d8a8de45d0
commit 05350c0047
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
2 changed files with 27 additions and 35 deletions

View File

@ -1,42 +1,37 @@
{ stdenv, fetchurl, ocaml, findlib, which, react, ssl
, ocamlnet, ocaml_pcre, cryptokit, tyxml, ipaddr, zlib,
libev, openssl, ocaml_sqlite3, tree, uutf, makeWrapper, camlp4
, camlzip, pgocaml, lwt2, lwt_react, lwt_ssl
{ 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
}:
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "ocsigenserver is not available for OCaml ${ocaml.version}"
else
let mkpath = p: n:
let v = stdenv.lib.getVersion ocaml; in
"${p}/lib/ocaml/${v}/site-lib/${n}";
"${p}/lib/ocaml/${ocaml.version}/site-lib/${n}";
in
let param =
if stdenv.lib.versionAtLeast ocaml.version "4.03" then {
version = "2.9";
sha256 = "0na3qa4h89f2wv31li63nfpg4151d0g8fply0bq59j3bhpyc85nd";
buildInputs = [ lwt_react lwt_ssl ];
ldpath = "";
} else {
version = "2.8";
sha256 = "1v44qv2ixd7i1qinyhlzzqiffawsdl7xhhh6ysd7lf93kh46d5sy";
buildInputs = [ lwt2 ];
ldpath = "${mkpath lwt2 "lwt"}";
}
; in
stdenv.mkDerivation rec {
version = "2.11.0";
name = "ocsigenserver-${version}";
stdenv.mkDerivation {
name = "ocsigenserver-${param.version}";
src = fetchurl {
url = "https://github.com/ocsigen/ocsigenserver/archive/${param.version}.tar.gz";
inherit (param) sha256;
src = fetchFromGitHub {
owner = "ocsigen";
repo = "ocsigenserver";
rev = version;
sha256 = "0y1ngki7w9s10ip7nj9qb7254bd5sp01xxz16sxyj7l7qz603hy2";
};
buildInputs = [ocaml which findlib react ssl
ocamlnet ocaml_pcre cryptokit tyxml ipaddr zlib libev openssl
ocaml_sqlite3 tree uutf makeWrapper camlp4 pgocaml camlzip ]
++ (param.buildInputs or []);
buildInputs = [ which makeWrapper ocaml findlib
lwt_react pgocaml camlzip ocaml_sqlite3
];
configureFlags = [ "--root $(out) --prefix /" ];
propagatedBuildInputs = [ cryptokit ipaddr lwt_log lwt_ssl ocamlnet
ocaml_pcre tyxml xml-light
];
configureFlags = [ "--root $(out)" "--prefix /" ];
dontAddPrefix = true;
@ -46,7 +41,7 @@ stdenv.mkDerivation {
''
rm -rf $out/var/run
wrapProgram $out/bin/ocsigenserver \
--prefix CAML_LD_LIBRARY_PATH : "${mkpath ssl "ssl"}:${param.ldpath}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath cryptokit "cryptokit"}:${mkpath ocaml_sqlite3 "sqlite3"}"
--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"}"
'';
dontPatchShebangs = true;

View File

@ -543,10 +543,7 @@ let
ocplib-simplex = callPackage ../development/ocaml-modules/ocplib-simplex { };
ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server {
lwt_react = lwt_react.override { lwt = lwt3; };
lwt_ssl = lwt_ssl.override { lwt = lwt3; };
};
ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server { };
ocsigen-start = callPackage ../development/ocaml-modules/ocsigen-start { };