From 33fec9d04da75da5f47d74fa2d0072a2ede3b891 Mon Sep 17 00:00:00 2001 From: drozv Date: Thu, 12 Jun 2014 21:46:59 -0400 Subject: [PATCH] ocaml: fix x11 include and lib parameters for configure script Close #2923, fixes #2922. --- pkgs/development/compilers/ocaml/4.01.0.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ocaml/4.01.0.nix b/pkgs/development/compilers/ocaml/4.01.0.nix index 79a7c8cd61f6..48966fc2866f 100644 --- a/pkgs/development/compilers/ocaml/4.01.0.nix +++ b/pkgs/development/compilers/ocaml/4.01.0.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, x11 }: +{ stdenv, fetchurl, ncurses, buildEnv, libX11, xproto }: let useX11 = !stdenv.isArm && !stdenv.isMips; @@ -8,6 +8,10 @@ in stdenv.mkDerivation rec { + x11env = buildEnv { name = "x11env"; paths = [libX11 xproto]; }; + x11lib = x11env + "/lib"; + x11inc = x11env + "/include"; + name = "ocaml-4.01.0"; src = fetchurl { @@ -16,9 +20,11 @@ stdenv.mkDerivation rec { }; prefixKey = "-prefix "; - configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ]; + configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11lib + "-x11include" x11inc ]; + buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt"; - buildInputs = [ncurses] ++ optionals useX11 [ x11 ]; + buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ]; installTargets = "install" + optionalString useNativeCompilers " installopt"; preConfigure = '' CAT=$(type -tp cat)