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

View File

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