1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

glibc: fix cross builds on Darwin

evaluate buildPackages.glibc exclusively on Linux,
evaluating it on Darwin will lead to an unsupported platform error
This commit is contained in:
Michael Roitzsch 2019-02-26 18:17:31 +01:00 committed by GitHub
parent e52396ce2c
commit 00a41ebbc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ callPackage ./common.nix { inherit stdenv; } {
postInstall = (if stdenv.hostPlatform == stdenv.buildPlatform then ''
echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales
'' else ''
'' else stdenv.lib.optionalString stdenv.buildPlatform.isLinux ''
# This is based on http://www.linuxfromscratch.org/lfs/view/development/chapter06/glibc.html
# Instead of using their patch to build a build-native localedef,
# we simply use the one from buildPackages