From 9c441c41d74ac0175353805be052fc80dff15aaa Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 14 Oct 2014 13:04:19 +0200 Subject: [PATCH 01/10] update js_of_ocaml to 2.5 --- .../tools/ocaml/js_of_ocaml/Makefile.conf.diff | 2 +- pkgs/development/tools/ocaml/js_of_ocaml/default.nix | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff index ee39855fec9..e6fc96038ff 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff +++ b/pkgs/development/tools/ocaml/js_of_ocaml/Makefile.conf.diff @@ -3,7 +3,7 @@ @@ -1,6 +1,6 @@ # Where binaries are installed: --BINDIR := /usr/local/bin +-BINDIR := `dirname \`which ocamlc\`` +BINDIR := $(out)/bin #### diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index a7167d0c226..10f00c4e542 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -1,13 +1,15 @@ -{stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving}: +{stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, camlp4, + cmdliner}: stdenv.mkDerivation { name = "js_of_ocaml"; src = fetchurl { - url = https://github.com/ocsigen/js_of_ocaml/archive/2.2.tar.gz; - sha256 = "1cp81gpvyxgvzxg0vzyl8aa2zvcixp6m433w8zjifrg6vb7lhp97"; + url = https://github.com/ocsigen/js_of_ocaml/archive/2.5.tar.gz; + sha256 = "1prm08nf8szmd3p13ysb0yx1cy6lr671bnwsp25iny8hfbs39sjv"; }; - buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving]; + buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving + cmdliner camlp4]; patches = [ ./Makefile.conf.diff ]; From e8b24eb63e0ead9988191fe939a461bf36ec7674 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 14 Oct 2014 13:09:53 +0200 Subject: [PATCH 02/10] update tyxml to version 3.3.0 --- pkgs/development/ocaml-modules/tyxml/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix index 648f0a9cd17..2222af8d181 100644 --- a/pkgs/development/ocaml-modules/tyxml/default.nix +++ b/pkgs/development/ocaml-modules/tyxml/default.nix @@ -1,14 +1,14 @@ -{stdenv, fetchurl, ocaml, findlib, ocaml_oasis, camlp4}: +{stdenv, fetchurl, ocaml, findlib, ocaml_oasis, camlp4, uutf}: stdenv.mkDerivation { - name = "tyxml-3.1.1"; + name = "tyxml-3.3.0"; src = fetchurl { - url = http://github.com/ocsigen/tyxml/archive/3.1.1.tar.gz; - sha256 = "1r8im382r68kn8qy0857nv3y7h42i6ajyclxzmigfai7v2xdd05z"; + url = http://github.com/ocsigen/tyxml/archive/3.3.0.tar.gz; + sha256 = "0r1hj8qy91i48nd7wj0x2dqrgspqrry5awraxl4pl10vh0mn6pk7"; }; - buildInputs = [ocaml findlib ocaml_oasis camlp4]; + buildInputs = [ocaml findlib ocaml_oasis camlp4 uutf]; createFindlibDestdir = true; From bb2a9941e52b97a1be5c52a106b2b84fa3d40254 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 14 Oct 2014 13:10:08 +0200 Subject: [PATCH 03/10] add version number to the name of the js_of_ocaml package --- pkgs/development/tools/ocaml/js_of_ocaml/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index 10f00c4e542..4443d2d5340 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -2,7 +2,7 @@ cmdliner}: stdenv.mkDerivation { - name = "js_of_ocaml"; + name = "js_of_ocaml-2.5"; src = fetchurl { url = https://github.com/ocsigen/js_of_ocaml/archive/2.5.tar.gz; sha256 = "1prm08nf8szmd3p13ysb0yx1cy6lr671bnwsp25iny8hfbs39sjv"; From cf5e915bde178ed517450ce6719333b7a5386bc5 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 14 Oct 2014 13:14:57 +0200 Subject: [PATCH 04/10] Updgrade ocsigen-server to 2.5 --- .../ocaml-modules/ocsigen-server/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index e33d4037379..d5c066ae2aa 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -1,14 +1,18 @@ -{stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl, ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ocaml_ipaddr, zlib, libev, openssl, ocaml_sqlite3, tree}: +{stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl, +ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ocaml_ipaddr, zlib, +libev, openssl, ocaml_sqlite3, tree, uutf}: stdenv.mkDerivation { - name = "ocsigenserver-2.4.0"; + name = "ocsigenserver-2.5"; src = fetchurl { - url = https://github.com/ocsigen/ocsigenserver/archive/2.4.0.tar.gz; - sha256 = "1fjj8g6ivyfsa0446w77rjihhbw0gh5pgx7brywql2shk999riby"; + url = https://github.com/ocsigen/ocsigenserver/archive/2.5.tar.gz; + sha256 = "0ayzlzjwg199va4sclsldlcp0dnwdj45ahhg9ckb51m28c2pw46r"; }; - buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt ocamlnet ocaml_pcre cryptokit tyxml ocaml_ipaddr zlib libev openssl ocaml_sqlite3 tree]; + buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt + ocamlnet ocaml_pcre cryptokit tyxml ocaml_ipaddr zlib libev openssl + ocaml_sqlite3 tree uutf]; configureFlags = "--root $(out) --prefix /"; From bd8ce96ccbe66dac5fc5dd376556cd9515dace7f Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Tue, 14 Oct 2014 13:18:08 +0200 Subject: [PATCH 05/10] Update eliom to 4.1.0 --- pkgs/development/ocaml-modules/eliom/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 8a7045e263a..5fe86a92d0d 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation { - name = "eliom-4.0.0"; + name = "eliom-4.1.0"; src = fetchurl { - url = https://github.com/ocsigen/eliom/archive/4.0.0.tar.gz; - sha256 = "1xf2l6lvngxzwaw6lvr6sgi48rz0wxg65q9lz4jzqjarkp0sx206"; + url = https://github.com/ocsigen/eliom/archive/4.1.0.tar.gz; + sha256 = "10v7mrq3zsbxdlg8k8xif777mbvcdpabvnd1g7p2yqivr7f1qm24"; }; buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving From 407c762f18e187d339c2936e592d2d1de6c5e53b Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Wed, 15 Oct 2014 11:13:04 +0200 Subject: [PATCH 06/10] Make uutf a *propagated*BuildInput of ocamlPackages.tyxml --- pkgs/development/ocaml-modules/tyxml/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix index 2222af8d181..77cf0638255 100644 --- a/pkgs/development/ocaml-modules/tyxml/default.nix +++ b/pkgs/development/ocaml-modules/tyxml/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation { sha256 = "0r1hj8qy91i48nd7wj0x2dqrgspqrry5awraxl4pl10vh0mn6pk7"; }; - buildInputs = [ocaml findlib ocaml_oasis camlp4 uutf]; + buildInputs = [ocaml findlib ocaml_oasis camlp4]; + + propagatedBuildInputs = [uutf]; createFindlibDestdir = true; From 91fe0ddc624a5b8e05623026e4972f495f50d29b Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Wed, 15 Oct 2014 11:13:58 +0200 Subject: [PATCH 07/10] Build js_of_ocaml with tyxml support --- 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 4443d2d5340..103b0bfa45e 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -1,5 +1,5 @@ {stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, camlp4, - cmdliner}: + cmdliner, tyxml, reactivedata}: stdenv.mkDerivation { name = "js_of_ocaml-2.5"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [ocaml findlib ocaml_lwt menhir ocsigen_deriving - cmdliner camlp4]; + cmdliner tyxml camlp4 reactivedata]; patches = [ ./Makefile.conf.diff ]; From cfeb42b8eb61bb016741bc06885662c35af287d3 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Wed, 15 Oct 2014 11:14:34 +0200 Subject: [PATCH 08/10] Adapt the derivation for the update of eliom to 4.1 --- pkgs/development/ocaml-modules/eliom/default.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 5fe86a92d0d..2e23a5fa86d 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, ocaml, findlib, which, ocsigen_server, ocsigen_deriving, js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml, - ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp}: + ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp, + reactivedata}: stdenv.mkDerivation { @@ -14,12 +15,7 @@ stdenv.mkDerivation buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving js_of_ocaml ocaml_react ocaml_lwt calendar cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl - ocaml_pcre ocaml_optcomp]; - - preConfigure = - ''chmod a+x configure - sed s/deriving-ocsigen/deriving/g -i configure - ''; + ocaml_pcre ocaml_optcomp reactivedata]; configureFlags = "--root $(out) --prefix /"; From 8c9bbe00ac67a17a4b7801a38a5df90ca47cab70 Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Sun, 19 Oct 2014 18:47:18 +0200 Subject: [PATCH 09/10] Use opam to actually install eliom --- .../ocaml-modules/eliom/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 2e23a5fa86d..9f0427738f7 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl, ocaml, findlib, which, ocsigen_server, ocsigen_deriving, js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml, ocaml_ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp, - reactivedata}: + reactivedata, opam}: -stdenv.mkDerivation +stdenv.mkDerivation rec { - name = "eliom-4.1.0"; + pname = "eliom"; + version = "4.1.0"; + name = "${pname}-${version}"; src = fetchurl { url = https://github.com/ocsigen/eliom/archive/4.1.0.tar.gz; @@ -17,9 +19,15 @@ stdenv.mkDerivation cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl ocaml_pcre ocaml_optcomp reactivedata]; - configureFlags = "--root $(out) --prefix /"; - dontAddPrefix = true; + + installPhase = + let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version; + in + ''opam-installer --script --prefix=$out ${pname}.install > install.sh + sh install.sh + ln -s $out/lib/${pname} $out/lib/ocaml/${ocamlVersion}/site-lib/ + ''; createFindlibDestdir = true; From 10eb4786fd6896d8b674730b45dc333931c7237f Mon Sep 17 00:00:00 2001 From: Florent Becker Date: Sun, 19 Oct 2014 18:48:04 +0200 Subject: [PATCH 10/10] Use propagatedBuildInputs in eliom --- pkgs/development/ocaml-modules/eliom/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 9f0427738f7..9700a1d8cc5 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -15,12 +15,12 @@ stdenv.mkDerivation rec }; buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving - js_of_ocaml ocaml_react ocaml_lwt calendar - cryptokit tyxml ocaml_ipaddr ocamlnet ocaml_ssl - ocaml_pcre ocaml_optcomp reactivedata]; + js_of_ocaml ocaml_optcomp opam]; + + propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ocaml_ipaddr + calendar cryptokit ocamlnet ocaml_react ocaml_ssl + ocaml_pcre ]; - dontAddPrefix = true; - installPhase = let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version; in