glibcLocales: fix evaluation and build with outputs

This commit is contained in:
Vladimír Čunát 2015-04-20 20:53:45 +02:00
parent e81e2785c7
commit a56da607b1
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,8 @@ build null {
builder = ./locales-builder.sh;
outputs = [ "out" ];
# Awful hack: `localedef' doesn't allow the path to `locale-archive'
# to be overriden, but you *can* specify a prefix, i.e. it will use
# <prefix>/<path-to-glibc>/lib/locale/locale-archive. So we use
@ -25,7 +27,7 @@ build null {
# $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
buildPhase =
''
mkdir -p $TMPDIR/"${stdenv.gcc.libc}/lib/locale"
mkdir -p $TMPDIR/"${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