From 6f10cfc7777def2dcbcd15dfd9e2789770945584 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 2 Jan 2018 20:18:41 +0100 Subject: [PATCH 1/2] cmake: fix INSTALL_NAME_DIR for darwin libraries When there's a lib output libraries won't be intalled to $prefix causing output cycles. --- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index a92d54b3f14..a0f1cf00814 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -43,7 +43,7 @@ cmakeConfigurePhase() { # libraries are in a system path or in the same directory as the # executable. This flag makes the shared library accessible from its # nix/store directory. - cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=$prefix/lib $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags" cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags" cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputDev}/include $cmakeFlags" From dc2ae3aef603a33f83d6c560c39574df56ba8856 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 7 Jan 2018 09:45:56 +0100 Subject: [PATCH 2/2] brotli: remove darwin cmake fix --- pkgs/tools/compression/brotli/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index f4fbb368535..9a35013e381 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -21,10 +21,6 @@ stdenv.mkDerivation rec { # and the wonderful bazel BUILD file is already there (yay case-insensitivity?) prePatch = "rm BUILD"; - preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' - cmakeFlagsArray+=("-DCMAKE_INSTALL_NAME_DIR=$lib/lib") - ''; - meta = with stdenv.lib; { inherit (src.meta) homepage;