glibc: Fix cross-compilation of locales

This commit is contained in:
Ben Gamari 2017-12-15 21:30:37 -05:00 committed by Will Dietz
parent d72c4c694f
commit a868bf3797
2 changed files with 3 additions and 3 deletions

View File

@ -222,6 +222,6 @@ stdenv.mkDerivation ({
# To avoid a dependency on the build system 'bash'.
preFixup = ''
rm $bin/bin/{ldd,tzselect,catchsegv,xtrace}
rm -f $bin/bin/{ldd,tzselect,catchsegv,xtrace}
'';
})

View File

@ -6,7 +6,7 @@
https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
*/
{ stdenv, callPackage, writeText
{ stdenv, buildPackages, callPackage, writeText
, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
}:
@ -26,7 +26,7 @@ callPackage ./common.nix { inherit stdenv; } {
# $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
buildPhase =
''
mkdir -p $TMPDIR/"${stdenv.cc.libc.out}/lib/locale"
mkdir -p $TMPDIR/"${buildPackages.stdenv.cc.libc.out}/lib/locale"
# Hack to allow building of the locales (needed since glibc-2.12)
sed -i -e 's,^$(rtld-prefix) $(common-objpfx)locale/localedef,localedef --prefix='$TMPDIR',' ../glibc-2*/localedata/Makefile