about summary refs log tree commit diff
path: root/pkgs/applications/graphics/sane
diff options
context:
space:
mode:
authorGuillaume Girol <symphorien+git@xlumurb.eu>2024-03-03 12:00:00 +0000
committerGuillaume Girol <symphorien+git@xlumurb.eu>2024-03-03 12:00:00 +0000
commitd5850d5c60f9024f852701e58f245266a471d03f (patch)
treefcd832de3df0cd9b9128fa75f0b99e8f185892a2 /pkgs/applications/graphics/sane
parent1536926ef5621b09bba54035ae2bb6d806d72ac8 (diff)
nixos/sane: fix disabling backends which are subwords of other backends
Fixes https://github.com/NixOS/nixpkgs/issues/292159
Diffstat (limited to 'pkgs/applications/graphics/sane')
-rw-r--r--pkgs/applications/graphics/sane/config.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/applications/graphics/sane/config.nix b/pkgs/applications/graphics/sane/config.nix
index 8c7b94faca6cf..0405eeb05c2c4 100644
--- a/pkgs/applications/graphics/sane/config.nix
+++ b/pkgs/applications/graphics/sane/config.nix
@@ -29,8 +29,8 @@ installSanePath = path: ''
       fi
     '';
     disableBackend = backend: ''
-      grep -q '${backend}' $out/etc/sane.d/dll.conf || { echo '${backend} is not a default plugin in $SANE_CONFIG_DIR/dll.conf'; exit 1; }
-      substituteInPlace $out/etc/sane.d/dll.conf --replace '${backend}' '# ${backend} disabled in nixos config'
+      grep -w -q '${backend}' $out/etc/sane.d/dll.conf || { echo '${backend} is not a default plugin in $SANE_CONFIG_DIR/dll.conf'; exit 1; }
+      sed -i 's/\b${backend}\b/# ${backend} disabled by nixos config/' $out/etc/sane.d/dll.conf
     '';
 in
 stdenv.mkDerivation {