diff options
author | John Ericson <subscribe@JohnEricson.me> | 2018-09-19 12:49:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 12:49:09 -0400 |
commit | aff090292cc1029a3025572a99bca0caecdfa769 (patch) | |
tree | fad3c4d971b21f84f00fb82a97ebedee36f8f5f2 /pkgs | |
parent | 5fb0ed64d0dfcb68d1e60e8a220f68ecc22c3967 (diff) | |
parent | cc83d5933373e256e4d31599d3f4e85ee80915a6 (diff) | |
download | nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar.gz nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar.bz2 nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar.lz nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar.xz nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.tar.zst nixpkgs-aff090292cc1029a3025572a99bca0caecdfa769.zip |
Merge pull request #46905 from obsidiansystems/zlib-ios
zlib: Fix iOS cross build
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index d3fb0970cd0..d348f877f72 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -3,7 +3,7 @@ , static ? false }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "zlib-${version}"; version = "1.2.11"; @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # what causes this difference. + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' for file in $out/lib/*.so* $out/lib/*.dylib* ; do - install_name_tool -id "$file" $file + ${stdenv.cc.bintools.targetPrefix}install_name_tool -id "$file" $file done '' # Non-typical naming confuses libtool which then refuses to use zlib's DLL @@ -78,4 +78,8 @@ stdenv.mkDerivation rec { license = licenses.zlib; platforms = platforms.all; }; -} +} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { + preConfigure = '' + export CHOST=${stdenv.hostPlatform.config} + ''; +}) |