From e2bb0c5da85bf66648103395fe926a9c8f274840 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Thu, 20 Oct 2016 10:19:57 +0200 Subject: [PATCH 1/4] js_of_ocaml: propagate dependency on ppx_deriving ppx_deriving is needed by js_of_ocaml even when it is not used in the code to be compiled by js_of_ocaml --- pkgs/development/tools/ocaml/js_of_ocaml/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index b19f078d9a2..33a7fe52c39 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -8,9 +8,9 @@ stdenv.mkDerivation { sha256 = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj"; }; - buildInputs = [ ocaml findlib menhir ocsigen_deriving ppx_deriving + buildInputs = [ ocaml findlib menhir ocsigen_deriving cmdliner tyxml reactivedata cppo which base64]; - propagatedBuildInputs = [ ocaml_lwt camlp4 ]; + propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ]; patches = [ ./Makefile.conf.diff ]; From 51e0173c284aecc857fd81533df36e541ae66f08 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Sat, 22 Oct 2016 11:03:56 +0200 Subject: [PATCH 2/4] ocamlPackages.ocaml_pcre: change name from ocaml-ocaml-pcre to ocaml-pcre The old name was confusing some dependencies when searching for dllpcrestubs.so --- pkgs/development/ocaml-modules/pcre/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix index dd152262ca7..d2e0e0aa727 100644 --- a/pkgs/development/ocaml-modules/pcre/default.nix +++ b/pkgs/development/ocaml-modules/pcre/default.nix @@ -1,7 +1,7 @@ {stdenv, buildOcaml, fetchurl, pcre, ocaml, findlib}: buildOcaml { - name = "ocaml-pcre"; + name = "pcre"; version = "7.1.1"; src = fetchurl { From a52c1b484017d57ec1a7a9bb3a7add8bcabc11a1 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Sat, 22 Oct 2016 11:05:39 +0200 Subject: [PATCH 3/4] pgocaml: 2.2 -> 2.3 Changes the build system from mkDerivation to buildOcaml --- .../ocaml-modules/pgocaml/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix index 6b9ae97ad54..a8b3ed15862 100644 --- a/pkgs/development/ocaml-modules/pgocaml/default.nix +++ b/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -1,14 +1,17 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4, calendar, csv, ocaml_pcre }: +{ stdenv, fetchurl, buildOcaml, calendar, csv, re }: -stdenv.mkDerivation { - name = "ocaml-pgocaml-2.2"; +buildOcaml { + name = "pgocaml"; + version = "2.3"; src = fetchurl { - url = http://forge.ocamlcore.org/frs/download.php/1506/pgocaml-2.2.tgz; - sha256 = "0x0dhlz2rqxpwfdqi384f9fn0ng2irifadmxfm2b4gcz7y1cl9rh"; + url = https://github.com/darioteixeira/pgocaml/archive/v2.3.tar.gz; + sha256 = "18lymxlvcf4nwxawkidq3pilsp5rhl0l8ifq6pjk3ssjlx9w53pg"; }; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ]; - propagatedBuildInputs = [ calendar csv ocaml_pcre ]; + buildInputs = [ ]; + propagatedBuildInputs = [ calendar csv re ]; + + configureFlags = [ "--enable-p4" ]; createFindlibDestdir = true; @@ -16,7 +19,6 @@ stdenv.mkDerivation { description = "An interface to PostgreSQL databases for OCaml applications"; homepage = http://pgocaml.forge.ocamlcore.org/; license = licenses.lgpl2; - platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ vbgl ]; }; } From ac69382453c61a17ec0669e449dac33d7e13c3a6 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Sat, 22 Oct 2016 11:08:27 +0200 Subject: [PATCH 4/4] eliom: modernize derivation --- .../ocaml-modules/eliom/default.nix | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 219f104271d..293faad2301 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -1,15 +1,10 @@ -{ stdenv, fetchurl, ocaml, findlib, which, ocsigen_server, ocsigen_deriving, +{ buildOcaml, stdenv, fetchurl, which, ocsigen_server, ocsigen_deriving, ocaml, js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml, ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp, - reactivedata, opam, ppx_tools, camlp4}: + reactivedata, opam, ppx_tools, ppx_deriving, camlp4}: -let ocamlVersion = (stdenv.lib.getVersion ocaml); - in - -( -assert stdenv.lib.versionAtLeast ocamlVersion "4"; - -stdenv.mkDerivation rec +let ocamlVersion = (stdenv.lib.getVersion ocaml); in +buildOcaml rec { pname = "eliom"; version = "5.0.0"; @@ -22,12 +17,11 @@ stdenv.mkDerivation rec patches = [ ./camlp4.patch ]; - buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving - js_of_ocaml ocaml_optcomp opam ppx_tools camlp4 ]; + buildInputs = [ which ocaml_optcomp opam ppx_tools camlp4 ]; - propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ipaddr - calendar cryptokit ocamlnet ocaml_react ocaml_ssl - ocaml_pcre ]; + propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ipaddr ocsigen_server ppx_deriving + ocsigen_deriving js_of_ocaml + calendar cryptokit ocamlnet ocaml_react ocaml_ssl ocaml_pcre ]; preConfigure = stdenv.lib.optionalString (!stdenv.lib.versionAtLeast ocamlVersion "4.02") '' export PPX=false @@ -57,8 +51,6 @@ stdenv.mkDerivation rec license = stdenv.lib.licenses.lgpl21; - platforms = ocaml.meta.platforms or []; - maintainers = [ stdenv.lib.maintainers.gal_bolle ]; }; -}) +}