From f7dc2df7c07a6b27785e9b3789309271e7620c03 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 25 Jun 2015 00:24:04 +0200 Subject: [PATCH] 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