Skip to content

Commit 1e686ec

Browse files
committed
patch build-gnu.sh for NixOS
1 parent 3f53522 commit 1e686ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

util/build-gnu.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,8 @@ sed -i "s/color_code='0;31;42'/color_code='31;42'/" tests/ls/quote-align.sh
345345

346346
# Slightly different error message
347347
sed -i 's/not supported/unexpected argument/' tests/mv/mv-exchange.sh
348+
# Most tests check that `/usr/bin/tr` is working correctly before running.
349+
# However in NixOS/Nix-based distros, the tr coreutil is located somewhere in
350+
# /nix/store/xxxxxxxxxxxx...xxxx/bin/tr
351+
# We just replace the references to `/usr/bin/tr` with the result of `$(which tr)`
352+
sed -i 's/\/usr\/bin\/tr/$(which tr)/' tests/init.sh

0 commit comments

Comments
 (0)