diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 11d0f1fbce43..8af369b1d17d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -211,7 +211,7 @@ isELF() { exec {fd}< "$fn" read -r -n 4 -u "$fd" magic exec {fd}<&- - if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi + if [ "$magic" = $'\177ELF' ]; then return 0; else return 1; fi } # Return success if the specified file is a script (i.e. starts with