From dedbc0ea74ed700abc2406df3d4046cd431cd47c Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 17 Jul 2023 08:18:12 +0200 Subject: 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 --- pkgs/games/build-support/setup-hooks/gog-unpack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs') 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 -- cgit 1.4.1