git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8296 from vbgl/ocamlp4

OCaml-4.02: fix ocamlbuild rules for camlp4

commit5c537f3bdd4542e5aaf979cef41b33bb2bb1116d authorvbgl <vbgl@users.noreply.github.com> dateThu 25 Jun 2015, 23:54 (11 years ago) parentacd97851d72ce4
12 files changed+71−19
pkgs/applications/science/logic/acgtk/default.nix+7−2 pkgs/applications/science/logic/coq/8.3.nix+2−2 pkgs/applications/science/math/glsurf/default.nix+3−3 pkgs/development/compilers/ocaml/4.02.1.nix+6 pkgs/development/ocaml-modules/bolt/default.nix+15−2 pkgs/development/ocaml-modules/eliom/camlp4.patch+24 pkgs/development/ocaml-modules/eliom/default.nix+2 pkgs/development/ocaml-modules/lablgtk/2.14.0.nix+2−2 pkgs/development/ocaml-modules/mysql/default.nix+2−2 pkgs/development/ocaml-modules/ulex/default.nix+3−2 pkgs/development/tools/ocaml/js_of_ocaml/default.nix+2−2 pkgs/top-level/all-packages.nix+3−2
pkgs/applications/science/logic/acgtk/default.nix+7−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal,
1+{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, camlp4,
22 buildBytecode ? true,
33 buildNative ? true,
44 installExamples ? true,
@@ -22,11 +22,16 @@ stdenv.mkDerivation {
2222 sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6";
2323 };
2424
25− buildInputs = [ ocaml findlib dypgen bolt ansiterminal ];
25+ buildInputs = [ ocaml findlib dypgen bolt ansiterminal camlp4 ];
2626
2727 patches = [ ./install-emacs-to-site-lisp.patch
2828 ./use-nix-ocaml-byteflags.patch ];
2929
30+ postPatch = stdenv.lib.optionalString (camlp4 != null) ''
31+ substituteInPlace src/Makefile.master.in \
32+ --replace "+camlp4" "${camlp4}/lib/ocaml/${getVersion ocaml}/site-lib/camlp4/"
33+ '';
34+
3035 # The bytecode executable is dependent on the dynamic library provided by
3136 # ANSITerminal. We can use the -dllpath flag of ocamlc (analogous to
3237 # -rpath) to make sure that ocamlrun is able to link the library at
pkgs/applications/science/logic/coq/8.3.nix+2−2
@@ -1,6 +1,6 @@
11# - coqide compilation can be disabled by setting lablgtk to null;
22
3−{stdenv, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
3+{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null }:
44
55let
66 version = "8.3pl4";
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
2121 sha256 = "17d3lmchmqir1rawnr52g78srg4wkd7clzpzfsivxc4y1zp6rwkr";
2222 };
2323
24− buildInputs = [ ocaml findlib camlp5 ncurses lablgtk ];
24+ buildInputs = [ make ocaml findlib camlp5 ncurses lablgtk ];
2525
2626 prefixKey = "-prefix ";
2727
pkgs/applications/science/math/glsurf/default.nix+3−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchdarcs, ocaml, findlib, lablgl, camlimages, mesa, freeglut, ocaml_mysql, mlgmp, mpfr, gmp, libtiff, libjpeg, libpng, giflib }:
1+{ stdenv, fetchdarcs, ocaml, findlib, lablgl, camlimages, mesa, freeglut, ocaml_mysql, mysql, mlgmp, mpfr, gmp, libtiff, libjpeg, libpng, giflib }:
22
33let
44 ocaml_version = (builtins.parseDrvName ocaml.name).version;
@@ -10,11 +10,11 @@ stdenv.mkDerivation {
1010 src = fetchdarcs {
1111 url = "http://lama.univ-savoie.fr/~raffalli/GlSurf";
1212 rev = "3.3";
13− sha256 = ""; md5="";
13+ sha256 = "0ljvvzz31j7l8rvsv63x1kj70nhw3al3k294m79hpmwjvym1mzfa";
1414 };
1515
1616 buildInputs = [ ocaml findlib freeglut mesa
17− lablgl camlimages ocaml_mysql mlgmp mpfr gmp
17+ lablgl camlimages ocaml_mysql mysql.lib mlgmp mpfr gmp
1818 libtiff libjpeg libpng giflib ];
1919
2020 installPhase = ''
pkgs/development/compilers/ocaml/4.02.1.nix+6
@@ -9,6 +9,10 @@ assert useX11 -> !stdenv.isArm && !stdenv.isMips;
99let
1010 useNativeCompilers = !stdenv.isMips;
1111 inherit (stdenv.lib) optionals optionalString;
12+ patchOcamlBuild = fetchurl {
13+ url = https://github.com/ocaml/ocaml/pull/117.patch;
14+ sha256 = "0x2cdn2sgzq29qzqg5y2ial0jqy8gjg5a7jf8qqch55dc4vkyjw0";
15+ };
1216in
1317
1418stdenv.mkDerivation rec {
@@ -24,6 +28,8 @@ stdenv.mkDerivation rec {
2428 sha256 = "1p7lqvh64xpykh99014mz21q8fs3qyjym2qazhhbq8scwldv1i38";
2529 };
2630
31+ patches = [ patchOcamlBuild ];
32+
2733 prefixKey = "-prefix ";
2834 configureFlags = optionals useX11 [ "-x11lib" x11lib
2935 "-x11include" x11inc ];
pkgs/development/ocaml-modules/bolt/default.nix+15−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, ocaml, findlib, which }:
1+{ stdenv, fetchurl, ocaml, findlib, which, camlp4 }:
22
33let inherit (stdenv.lib) getVersion versionAtLeast; in
44
@@ -14,7 +14,20 @@ stdenv.mkDerivation rec {
1414 sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy";
1515 };
1616
17− buildInputs = [ ocaml findlib which ];
17+ buildInputs = [ ocaml findlib which camlp4 ];
18+
19+ patchPhase = ''
20+ patch myocamlbuild.ml <<EOF
21+70,74c70
22+< let camlp4of =
23+< try
24+< let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
25+< Filename.concat path_bin "camlp4of"
26+< with _ -> "camlp4of" in
27+---
28+> let camlp4of = "camlp4of" in
29+EOF
30+ '';
1831
1932 # The custom `configure` script does not expect the --prefix
2033 # option. Installation is handled by ocamlfind.
pkgs/development/ocaml-modules/eliom/camlp4.patchnew file+24
@@ -0,0 +1,24 @@
1+--- a/src/_tags 2014-10-01 16:19:35.000000000 +0100
2++++ b/src/_tags 2014-11-09 16:55:34.470663377 +0000
3+@@ -39,7 +39,7 @@
4+ <lib/server/monitor/*.ml{,i}>:I(src/lib/server)
5+
6+ <syntax/pa_*.ml{,i}>: syntax(camlp4o),package(camlp4.quotations.o,camlp4.extend)
7+-<syntax/pa_*.ml{,i}>: I(+camlp4/Camlp4Parsers)
8++<syntax/pa_*.ml{,i}>: use_camlp4_full
9+
10+
11+ <ocamlbuild/ocamlbuild_eliom.ml{,i}>: package(ocamlbuild,js_of_ocaml.ocamlbuild)
12+
13+--- a/src/lib/eliom_registration.server.ml 2014-10-01 16:19:35.000000000 +0100
14++++ b/src/lib/eliom_registration.server.ml 2014-11-09 17:26:16.093198699 +0000
15+@@ -2440,7 +2440,7 @@
16+ (Ocaml.register_post_coservice'
17+ ?scope ?options ?charset ?code ?content_type ?headers ?secure_session ?name
18+ ?csrf_safe ?csrf_scope ?csrf_secure ?max_use ?timeout ?https ?error_handler
19+- ~post_params:Eliom_parameter.(ocaml "argument" argument_type)
20++ ~post_params:(Eliom_parameter.ocaml "argument" argument_type)
21+ (fun () argument -> f argument))
22+ (Eliom_wrap.create_unwrapper
23+ (Eliom_wrap.id_of_int Eliom_common_base.server_function_unwrap_id_int))
24+
pkgs/development/ocaml-modules/eliom/default.nix+2
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec
1414 sha256 = "10v7mrq3zsbxdlg8k8xif777mbvcdpabvnd1g7p2yqivr7f1qm24";
1515 };
1616
17+ patches = [ ./camlp4.patch ];
18+
1719 buildInputs = [ocaml which ocsigen_server findlib ocsigen_deriving
1820 js_of_ocaml ocaml_optcomp opam];
1921
pkgs/development/ocaml-modules/lablgtk/2.14.0.nix+2−2
@@ -1,4 +1,4 @@
1−{stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview}:
1+{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk, libgnomecanvas, libglade, gtksourceview, camlp4 }:
22
33let
44 ocaml_version = (builtins.parseDrvName ocaml.name).version;
@@ -14,7 +14,7 @@ stdenv.mkDerivation (rec {
1414 sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9";
1515 };
1616
17− buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview];
17+ buildInputs = [ ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview camlp4 ];
1818
1919 configureFlags = "--with-libdir=$(out)/lib/ocaml/${ocaml_version}/site-lib";
2020 buildFlags = "world";
pkgs/development/ocaml-modules/mysql/default.nix+2−2
@@ -1,4 +1,4 @@
1−{stdenv, fetchurl, ocaml, findlib, mysql}:
1+{ stdenv, fetchurl, ocaml, findlib, mysql, camlp4 }:
22
33# TODO: la versione stabile da' un errore di compilazione dovuto a
44# qualche cambiamento negli header .h
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
2323 "--libdir=$out/lib/ocaml/${ocaml_version}/site-lib/mysql"
2424 ];
2525
26− buildInputs = [ocaml findlib mysql.lib ];
26+ buildInputs = [ocaml findlib mysql.lib camlp4 ];
2727
2828 createFindlibDestdir = true;
2929
pkgs/development/ocaml-modules/ulex/default.nix+3−2
@@ -1,4 +1,4 @@
1−{stdenv, fetchurl, ocaml, findlib }:
1+{ stdenv, fetchurl, ocaml, findlib, camlp4 }:
22
33let
44 ocaml_version = (builtins.parseDrvName ocaml.name).version;
@@ -17,7 +17,8 @@ stdenv.mkDerivation {
1717
1818 createFindlibDestdir = true;
1919
20− buildInputs = [ocaml findlib];
20+ buildInputs = [ ocaml findlib ];
21+ propagatedBuildInputs = [ camlp4 ];
2122
2223 buildFlags = "all all.opt";
2324
pkgs/development/tools/ocaml/js_of_ocaml/default.nix+2−2
@@ -9,8 +9,8 @@ stdenv.mkDerivation {
99 };
1010
1111 buildInputs = [ocaml findlib menhir ocsigen_deriving
12− cmdliner tyxml camlp4 reactivedata];
13− propagatedBuildInputs = [ ocaml_lwt ];
12+ cmdliner tyxml reactivedata];
13+ propagatedBuildInputs = [ ocaml_lwt camlp4 ];
1414
1515 patches = [ ./Makefile.conf.diff ];
1616
pkgs/top-level/all-packages.nix+3−2
@@ -4380,8 +4380,6 @@ let
43804380
43814381 mezzo = callPackage ../development/compilers/mezzo { };
43824382
4383− mldonkey = callPackage ../applications/networking/p2p/mldonkey { };
4384−
43854383 mlgmp = callPackage ../development/ocaml-modules/mlgmp { };
43864384
43874385 ocaml_batteries = callPackage ../development/ocaml-modules/batteries { };
@@ -11874,6 +11872,8 @@ let
1187411872
1187511873 mjpg-streamer = callPackage ../applications/video/mjpg-streamer { };
1187611874
11875+ mldonkey = callPackage ../applications/networking/p2p/mldonkey { };
11876+
1187711877 mmex = callPackage ../applications/office/mmex { };
1187811878
1187911879 moc = callPackage ../applications/audio/moc { };
@@ -14090,6 +14090,7 @@ let
1409014090 };
1409114091
1409214092 coq_8_3 = callPackage ../applications/science/logic/coq/8.3.nix {
14093+ make = gnumake3;
1409314094 inherit (ocamlPackages_3_12_1) ocaml findlib;
1409414095 camlp5 = ocamlPackages_3_12_1.camlp5_transitional;
1409514096 lablgtk = ocamlPackages_3_12_1.lablgtk_2_14;