From 852161092185a41a7fd290063a7f84cc686ac0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20P=C3=A9ron?= Date: Fri, 2 Aug 2024 13:23:08 +0200 Subject: [PATCH] patch build-gnu.sh for NixOS --- util/build-gnu.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 38df18daeb2..b004b9bd510 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -371,3 +371,8 @@ sed -i "s/color_code='0;31;42'/color_code='31;42'/" tests/ls/quote-align.sh # Slightly different error message sed -i 's/not supported/unexpected argument/' tests/mv/mv-exchange.sh +# Most tests check that `/usr/bin/tr` is working correctly before running. +# However in NixOS/Nix-based distros, the tr coreutil is located somewhere in +# /nix/store/xxxxxxxxxxxx...xxxx/bin/tr +# We just replace the references to `/usr/bin/tr` with the result of `$(which tr)` +sed -i 's/\/usr\/bin\/tr/$(which tr)/' tests/init.sh