diff --git a/pkgs/development/libraries/glibc-2.12/locales.nix b/pkgs/development/libraries/glibc-2.12/locales.nix index 38f3f0723848..d598e0e094dc 100644 --- a/pkgs/development/libraries/glibc-2.12/locales.nix +++ b/pkgs/development/libraries/glibc-2.12/locales.nix @@ -28,12 +28,13 @@ in mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale" # Hack to allow building of the locales (needed since glibc-2.12) - sed -i -e 's/^LOCALEDEF=/LOCALEDEF?=/' ../glibc-2*/localedata/Makefile + sed -i -e "s,^LOCALEDEF=.*,LOCALEDEF=localedef --prefix=$TMPDIR," -e \ + /library-path/d ../glibc-2*/localedata/Makefile + ${if allLocales then "" else + "echo SUPPORTED-LOCALES=\"${toString locales}\" > ../glibc-2*/localedata/SUPPORTED"} make localedata/install-locales \ - LOCALEDEF="localedef --prefix=$TMPDIR" \ localedir=$out/lib/locale \ - ${if allLocales then "" else "SUPPORTED-LOCALES=\"${toString locales}\""} ''; installPhase =