diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 311f60795bae..670b9087f110 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -112,7 +112,8 @@ let echo "OK" filesToFixup="$(for i in "$out"/*; do - grep -l '\B\(/usr\)\?/s\?bin' "$i" || : + # list all files referring to (/usr)/bin paths, but allow references to /bin/sh. + grep -P -l '\B(?!\/bin\/sh\b)(\/usr)?\/bin(?:\/.*)?' "$i" || : done)" if [ -n "$filesToFixup" ]; then diff --git a/pkgs/tools/filesystems/bcache-tools/default.nix b/pkgs/tools/filesystems/bcache-tools/default.nix index f6dfdd84d8c4..58f6a05992e9 100644 --- a/pkgs/tools/filesystems/bcache-tools/default.nix +++ b/pkgs/tools/filesystems/bcache-tools/default.nix @@ -35,10 +35,6 @@ stdenv.mkDerivation rec { "UDEVLIBDIR=${placeholder "out"}/lib/udev/" ]; - preBuild = '' - sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules - ''; - preInstall = '' mkdir -p "$out/sbin" "$out/lib/udev/rules.d" "$out/share/man/man8" '';