From 24a378c070a1cebf63b2308f4ede6bdaf1126487 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 19 Nov 2020 16:36:36 +0900 Subject: [PATCH] zlib: fix cross compilation on darwin --- pkgs/development/libraries/zlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 998550d1fee6..a9fadf46c4b2 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -37,8 +37,8 @@ stdenv.mkDerivation (rec { postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace configure \ - --replace '/usr/bin/libtool' 'ar' \ - --replace 'AR="libtool"' 'AR="ar"' \ + --replace '/usr/bin/libtool' '${stdenv.cc.targetPrefix}ar' \ + --replace 'AR="libtool"' 'AR="${stdenv.cc.targetPrefix}ar"' \ --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"' '';