about summary refs log tree commit diff
path: root/pkgs/applications/graphics/sane
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2024-06-01 22:39:00 +0200
committerGitHub <noreply@github.com>2024-06-01 22:39:00 +0200
commit439832d6bffcb1ebcbd0ba3ef59a720995272777 (patch)
tree046812fb3610f8f58c098d0909a37b3e30cffd76 /pkgs/applications/graphics/sane
parentc04189d8cf298d2dec5dffd88e4ec4a2bd8399d3 (diff)
parentd5850d5c60f9024f852701e58f245266a471d03f (diff)
Merge pull request #293022 from symphorien/nixos_module_sane_disabled_backed_word_boundary
nixos/sane: fix disabling backends which are subwords of other backends
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 {