summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-01-26 23:40:40 +0100
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-10-23 23:20:42 -0400
commitab6bbdd5cd2a271ac795f1f44a94f77e41edf29f (patch)
treea6726593f0f08195af1274cb9ad4552bea53acf5 /pkgs/development/libraries/glibc
parent88cd633ea4dec7b9a247c0fd8ccb95f4982f5bf7 (diff)
downloadnixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar.gz
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar.bz2
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar.lz
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar.xz
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.tar.zst
nixpkgs-ab6bbdd5cd2a271ac795f1f44a94f77e41edf29f.zip
linux-headers: Fix Darwin cross build
Carefully fake cc-version and cc-fullversion to avoid needing a compiler
for the kernel itself to build the headers.

For some reason, doing `make install_headers` twice, first without
INSTALL_HDR_PATH=$out then with, is neccessary to get this to work.
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r--pkgs/development/libraries/glibc/common.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index a7a4c2fbacd..b77c450bdec 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -133,7 +133,9 @@ stdenv.mkDerivation ({
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ bison ];
-  buildInputs = lib.optionals withGd [ gd libpng ];
+  # TODO make linuxHeaders unconditional next mass rebuild
+  buildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) linuxHeaders
+    ++ lib.optionals withGd [ gd libpng ];
 
   # Needed to install share/zoneinfo/zone.tab.  Set to impure /bin/sh to
   # prevent a retained dependency on the bootstrap tools in the stdenv-linux