From af3f91085a0c7b8f8b9a7c0cdd780463d4fc473d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 11 Jun 2015 23:52:16 +0200 Subject: [PATCH 01/11] mldonkey: move package out of ocamlPackages as it does not provides any library but only an executable program --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e7d5caa4471..d520d202dad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4380,8 +4380,6 @@ let mezzo = callPackage ../development/compilers/mezzo { }; - mldonkey = callPackage ../applications/networking/p2p/mldonkey { }; - mlgmp = callPackage ../development/ocaml-modules/mlgmp { }; ocaml_batteries = callPackage ../development/ocaml-modules/batteries { }; @@ -11876,6 +11874,8 @@ let mjpg-streamer = callPackage ../applications/video/mjpg-streamer { }; + mldonkey = callPackage ../applications/networking/p2p/mldonkey { }; + mmex = callPackage ../applications/office/mmex { }; moc = callPackage ../applications/audio/moc { }; From d440059e7d828518735134aed8826da5214e6efa Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 11 Jun 2015 23:59:55 +0200 Subject: [PATCH 02/11] OCaml-4.02: fix ocamlbuild This addresses the issue described at http://caml.inria.fr/mantis/view.php?id=6605 --- pkgs/development/compilers/ocaml/4.02.1.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/compilers/ocaml/4.02.1.nix b/pkgs/development/compilers/ocaml/4.02.1.nix index 6f4cce522e4..d70fe3384e0 100644 --- a/pkgs/development/compilers/ocaml/4.02.1.nix +++ b/pkgs/development/compilers/ocaml/4.02.1.nix @@ -9,6 +9,10 @@ assert useX11 -> !stdenv.isArm && !stdenv.isMips; let useNativeCompilers = !stdenv.isMips; inherit (stdenv.lib) optionals optionalString; + patchOcamlBuild = fetchurl { + url = https://github.com/ocaml/ocaml/pull/117.patch; + sha256 = "0x2cdn2sgzq29qzqg5y2ial0jqy8gjg5a7jf8qqch55dc4vkyjw0"; + }; in stdenv.mkDerivation rec { @@ -24,6 +28,8 @@ stdenv.mkDerivation rec { sha256 = "1p7lqvh64xpykh99014mz21q8fs3qyjym2qazhhbq8scwldv1i38"; }; + patches = [ patchOcamlBuild ]; + prefixKey = "-prefix "; configureFlags = optionals useX11 [ "-x11lib" x11lib "-x11include" x11inc ]; From e63c1ea33e5871082d6400718e7dad2ba4e3a08a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 12 Jun 2015 00:03:00 +0200 Subject: [PATCH 03/11] ocaml-ulex: fix build with OCaml-4.02 (depends on camlp4) --- pkgs/development/ocaml-modules/ulex/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/ulex/default.nix b/pkgs/development/ocaml-modules/ulex/default.nix index 28950078f39..7c8acafe769 100644 --- a/pkgs/development/ocaml-modules/ulex/default.nix +++ b/pkgs/development/ocaml-modules/ulex/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ocaml, findlib }: +{ stdenv, fetchurl, ocaml, findlib, camlp4 }: let ocaml_version = (builtins.parseDrvName ocaml.name).version; @@ -17,7 +17,8 @@ stdenv.mkDerivation { createFindlibDestdir = true; - buildInputs = [ocaml findlib]; + buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ camlp4 ]; buildFlags = "all all.opt"; From bce75f1d1a4fe9887cdfb3921fdef5ab1539abb1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 12 Jun 2015 00:04:24 +0200 Subject: [PATCH 04/11] eliom: fix build with OCaml-4.02 --- .../ocaml-modules/eliom/camlp4.patch | 24 +++++++++++++++++++ .../ocaml-modules/eliom/default.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/eliom/camlp4.patch diff --git a/pkgs/development/ocaml-modules/eliom/camlp4.patch b/pkgs/development/ocaml-modules/eliom/camlp4.patch new file mode 100644 index 00000000000..561d5305bef --- /dev/null +++ b/pkgs/development/ocaml-modules/eliom/camlp4.patch @@ -0,0 +1,24 @@ +--- a/src/_tags 2014-10-01 16:19:35.000000000 +0100 ++++ b/src/_tags 2014-11-09 16:55:34.470663377 +0000 +@@ -39,7 +39,7 @@ + :I(src/lib/server) + + : syntax(camlp4o),package(camlp4.quotations.o,camlp4.extend) +-: I(+camlp4/Camlp4Parsers) ++: use_camlp4_full + + + : package(ocamlbuild,js_of_ocaml.ocamlbuild) + +--- a/src/lib/eliom_registration.server.ml 2014-10-01 16:19:35.000000000 +0100 ++++ b/src/lib/eliom_registration.server.ml 2014-11-09 17:26:16.093198699 +0000 +@@ -2440,7 +2440,7 @@ + (Ocaml.register_post_coservice' + ?scope ?options ?charset ?code ?content_type ?headers ?secure_session ?name + ?csrf_safe ?csrf_scope ?csrf_secure ?max_use ?timeout ?https ?error_handler +- ~post_params:Eliom_parameter.(ocaml "argument" argument_type) ++ ~post_params:(Eliom_parameter.ocaml "argument" argument_type) + (fun () argument -> f argument)) + (Eliom_wrap.create_unwrapper + (Eliom_wrap.id_of_int Eliom_common_base.server_function_unwrap_id_int)) + diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix index 54644d83699..7fe26863b3d 100644 --- a/pkgs/development/ocaml-modules/eliom/default.nix +++ b/pkgs/development/ocaml-modules/eliom/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec sha256 = "10v7mrq3zsbxdlg8k8xif777mbvcdpabvnd1g7p2yqivr7f1qm24"; }; + patches = [ ./camlp4.patch ]; + buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving js_of_ocaml ocaml_optcomp opam]; From 8263cd29177f2783a881c76856447100116438c6 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 18 Jun 2015 00:37:09 +0200 Subject: [PATCH 05/11] ocaml-mysql: fix build with OCaml-4.02 (needs camlp4) --- pkgs/development/ocaml-modules/mysql/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/mysql/default.nix b/pkgs/development/ocaml-modules/mysql/default.nix index 4ffef60c4bf..fc26d8b989c 100644 --- a/pkgs/development/ocaml-modules/mysql/default.nix +++ b/pkgs/development/ocaml-modules/mysql/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ocaml, findlib, mysql}: +{ stdenv, fetchurl, ocaml, findlib, mysql, camlp4 }: # TODO: la versione stabile da' un errore di compilazione dovuto a # qualche cambiamento negli header .h @@ -23,7 +23,7 @@ stdenv.mkDerivation { "--libdir=$out/lib/ocaml/${ocaml_version}/site-lib/mysql" ]; - buildInputs = [ocaml findlib mysql.lib ]; + buildInputs = [ocaml findlib mysql.lib camlp4 ]; createFindlibDestdir = true; From 5beebaca58d071a1fa0e0a92e15cbecbcf192ff5 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 18 Jun 2015 01:12:53 +0200 Subject: [PATCH 06/11] fix glsurf --- pkgs/applications/science/math/glsurf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/glsurf/default.nix b/pkgs/applications/science/math/glsurf/default.nix index 1439d327d6e..2c09f572d12 100644 --- a/pkgs/applications/science/math/glsurf/default.nix +++ b/pkgs/applications/science/math/glsurf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchdarcs, ocaml, findlib, lablgl, camlimages, mesa, freeglut, ocaml_mysql, mlgmp, mpfr, gmp, libtiff, libjpeg, libpng, giflib }: +{ stdenv, fetchdarcs, ocaml, findlib, lablgl, camlimages, mesa, freeglut, ocaml_mysql, mysql, mlgmp, mpfr, gmp, libtiff, libjpeg, libpng, giflib }: let ocaml_version = (builtins.parseDrvName ocaml.name).version; @@ -10,11 +10,11 @@ stdenv.mkDerivation { src = fetchdarcs { url = "http://lama.univ-savoie.fr/~raffalli/GlSurf"; rev = "3.3"; - sha256 = ""; md5=""; + sha256 = "0ljvvzz31j7l8rvsv63x1kj70nhw3al3k294m79hpmwjvym1mzfa"; }; buildInputs = [ ocaml findlib freeglut mesa - lablgl camlimages ocaml_mysql mlgmp mpfr gmp + lablgl camlimages ocaml_mysql mysql.lib mlgmp mpfr gmp libtiff libjpeg libpng giflib ]; installPhase = '' From ca48e509465d08690472d9ab3f7242184c12b886 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 00:15:05 +0200 Subject: [PATCH 07/11] bolt: fix build with OCaml 4.02 --- pkgs/development/ocaml-modules/bolt/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix index 9b0efd816bd..61c3d6f23b4 100644 --- a/pkgs/development/ocaml-modules/bolt/default.nix +++ b/pkgs/development/ocaml-modules/bolt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, which }: +{ stdenv, fetchurl, ocaml, findlib, which, camlp4 }: let inherit (stdenv.lib) getVersion versionAtLeast; in @@ -14,7 +14,20 @@ stdenv.mkDerivation rec { sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy"; }; - buildInputs = [ ocaml findlib which ]; + buildInputs = [ ocaml findlib which camlp4 ]; + + patchPhase = '' + patch myocamlbuild.ml < "camlp4of" in +--- +> let camlp4of = "camlp4of" in +EOF + ''; # The custom `configure` script does not expect the --prefix # option. Installation is handled by ocamlfind. From f7dc2df7c07a6b27785e9b3789309271e7620c03 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 00:24:04 +0200 Subject: [PATCH 08/11] acgtk: fix build with OCaml 4.02 --- pkgs/applications/science/logic/acgtk/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix index 41c6cf75f32..0fd90ac13b6 100644 --- a/pkgs/applications/science/logic/acgtk/default.nix +++ b/pkgs/applications/science/logic/acgtk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, +{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, camlp4, buildBytecode ? true, buildNative ? true, installExamples ? true, @@ -22,11 +22,16 @@ stdenv.mkDerivation { sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6"; }; - buildInputs = [ ocaml findlib dypgen bolt ansiterminal ]; + buildInputs = [ ocaml findlib dypgen bolt ansiterminal camlp4 ]; patches = [ ./install-emacs-to-site-lisp.patch ./use-nix-ocaml-byteflags.patch ]; + postPatch = stdenv.lib.optionalString (camlp4 != null) '' + substituteInPlace src/Makefile.master.in \ + --replace "+camlp4" "${camlp4}/lib/ocaml/${getVersion ocaml}/site-lib/camlp4/" + ''; + # The bytecode executable is dependent on the dynamic library provided by # ANSITerminal. We can use the -dllpath flag of ocamlc (analogous to # -rpath) to make sure that ocamlrun is able to link the library at From 3105b66dbdf14231744762b6d7d8c40cebc00eae Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 00:30:10 +0200 Subject: [PATCH 09/11] lablgtk-2.14: fix build with OCaml-4.02 (needs camlp4) --- pkgs/development/ocaml-modules/lablgtk/2.14.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix index 2e50b897f3d..1815bfc64dd 100644 --- a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix +++ b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview}: +{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview, camlp4 }: let ocaml_version = (builtins.parseDrvName ocaml.name).version; @@ -14,7 +14,7 @@ stdenv.mkDerivation (rec { sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; }; - buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview]; + buildInputs = [ ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview camlp4 ]; configureFlags = "--with-libdir=$(out)/lib/ocaml/${ocaml_version}/site-lib"; buildFlags = "world"; From 2727ecec3744e5c271c0040f94ca436068b309a1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 00:57:16 +0200 Subject: [PATCH 10/11] js_of_ocaml: propagate camlp4 dependency --- 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 9989afdefc4..eaabd50059d 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -9,8 +9,8 @@ stdenv.mkDerivation { }; buildInputs = [ocaml findlib menhir ocsigen_deriving - cmdliner tyxml camlp4 reactivedata]; - propagatedBuildInputs = [ ocaml_lwt ]; + cmdliner tyxml reactivedata]; + propagatedBuildInputs = [ ocaml_lwt camlp4 ]; patches = [ ./Makefile.conf.diff ]; From 1d72ce49cf8d6c4d68360b113513d1d87ce66d61 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 02:04:23 +0200 Subject: [PATCH 11/11] coq-8.3: fix (needs make 3) --- pkgs/applications/science/logic/coq/8.3.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/coq/8.3.nix b/pkgs/applications/science/logic/coq/8.3.nix index 63aaa02e67a..c59c4b06270 100644 --- a/pkgs/applications/science/logic/coq/8.3.nix +++ b/pkgs/applications/science/logic/coq/8.3.nix @@ -1,6 +1,6 @@ # - coqide compilation can be disabled by setting lablgtk to null; -{stdenv, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: +{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null }: let version = "8.3pl4"; @@ -21,7 +21,7 @@ stdenv.mkDerivation { sha256 = "17d3lmchmqir1rawnr52g78srg4wkd7clzpzfsivxc4y1zp6rwkr"; }; - buildInputs = [ ocaml findlib camlp5 ncurses lablgtk ]; + buildInputs = [ make ocaml findlib camlp5 ncurses lablgtk ]; prefixKey = "-prefix "; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d520d202dad..39b2e9b30bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14095,6 +14095,7 @@ let }; coq_8_3 = callPackage ../applications/science/logic/coq/8.3.nix { + make = gnumake3; inherit (ocamlPackages_3_12_1) ocaml findlib; camlp5 = ocamlPackages_3_12_1.camlp5_transitional; lablgtk = ocamlPackages_3_12_1.lablgtk_2_14;