···55# (e.g. due to minor changes in the compression algorithm, or changes
66# in timestamps).
7788-{ lib, fetchurl, unzip }:
88+{ lib, fetchurl, unzip, glibcLocalesUtf8 }:
991010{ # Optionally move the contents of the unpacked tree up one level.
1111 stripRoot ? true
···35353636 downloadToTemp = true;
37373838- nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
3838+ # Have to pull in glibcLocalesUtf8 for unzip in setup-hook.sh to handle
3939+ # UTF-8 aware locale:
4040+ # https://github.com/NixOS/nixpkgs/issues/176225#issuecomment-1146617263
4141+ nativeBuildInputs = [ unzip glibcLocalesUtf8 ] ++ nativeBuildInputs;
39424043 postFetch =
4144 ''
···11unpackCmdHooks+=(_tryUnzip)
22_tryUnzip() {
33 if ! [[ "$curSrc" =~ \.zip$ ]]; then return 1; fi
44- unzip -qq "$curSrc"
44+55+ # UTF-8 locale is needed for unzip on glibc to handle UTF-8 symbols:
66+ # https://github.com/NixOS/nixpkgs/issues/176225#issuecomment-1146617263
77+ # Otherwise unzip unpacks escaped file names as if '-U' options was in effect.
88+ #
99+ # Pick en_US.UTF-8 as most possible to be present on glibc, musl and darwin.
1010+ LANG=en_US.UTF-8 unzip -qq "$curSrc"
511}
+8-1
pkgs/top-level/all-packages.nix
···1759917599 relibc = callPackage ../development/libraries/relibc { };
17600176001760117601 # Only supported on Linux
1760217602- glibcLocales = if stdenv.hostPlatform.isLinux then callPackage ../development/libraries/glibc/locales.nix { } else null;
1760217602+ glibcLocales =
1760317603+ if stdenv.hostPlatform.isLinux
1760417604+ then callPackage ../development/libraries/glibc/locales.nix { }
1760517605+ else null;
1760617606+ glibcLocalesUtf8 =
1760717607+ if stdenv.hostPlatform.isLinux
1760817608+ then callPackage ../development/libraries/glibc/locales.nix { allLocales = false; }
1760917609+ else null;
17603176101760417611 glibcInfo = callPackage ../development/libraries/glibc/info.nix { };
1760517612