summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2015-06-25 00:24:04 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2015-06-25 08:55:30 +0200
commitf7dc2df7c07a6b27785e9b3789309271e7620c03 (patch)
tree1c367b1f5d28c1c327bd68f3820a488a63f59139 /pkgs/applications
parentca48e509465d08690472d9ab3f7242184c12b886 (diff)
downloadnixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar.gz
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar.bz2
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar.lz
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar.xz
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.tar.zst
nixlib-f7dc2df7c07a6b27785e9b3789309271e7620c03.zip
acgtk: fix build with OCaml 4.02
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/logic/acgtk/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix
index 41c6cf75f325..0fd90ac13b6e 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