about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2023-07-17 08:18:12 +0200
committeraszlig <aszlig@nix.build>2023-07-17 08:18:12 +0200
commitdedbc0ea74ed700abc2406df3d4046cd431cd47c (patch)
treed334ac698efda0427cd2ad2b27f142be57844367 /pkgs/games
parent1b23a0862e8edf57799ff792d71fe14c9a4154e6 (diff)
games/gog-unpack: Fix unpacking with newer bsdtar
With newer bsdtar, extraction fails because of this error:

  bsdtar: Pathname cannot be converted from UTF-8 to current locale.
  bsdtar: Archive entry has empty or unreadable filename ... skipping.
  bsdtar: Error exit delayed from previous errors.

The reason is that the current locale isn't set during Nix builds, so in
order for bsdtar to work properly, let's set it to C.UTF-8 so that it
hopefully doesn't convert anything at all (which is what we want).

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/build-support/setup-hooks/gog-unpack.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/games/build-support/setup-hooks/gog-unpack.sh b/pkgs/games/build-support/setup-hooks/gog-unpack.sh
index 8b70803c..f17efaa9 100644
--- a/pkgs/games/build-support/setup-hooks/gog-unpack.sh
+++ b/pkgs/games/build-support/setup-hooks/gog-unpack.sh
@@ -46,7 +46,7 @@ _tryUnpackGogMakeSelf() {
   # into "./...", so all we need to do in the end is to strip 2 components from
   # the resulting path. This discards every path that has been renamed to
   # "skip".
-  tail -c"+$zipfileOffset" "$curSrc" | bsdtar -xf - \
+  tail -c"+$zipfileOffset" "$curSrc" | LANG=C.UTF-8 bsdtar -xf - \
     -s '!^data/noarch/game/\(.*\)$!/_/game/\1!' \
     -s '!^data/noarch/support/icon\.png$!/_/game/xdg-icon.png!' \
     -s '!^[^/].*!skip!' --strip-components=2