Skip to content

Commit

Permalink
nixos/sane: fix disabling backends which are subwords of other backends
Browse files Browse the repository at this point in the history
  • Loading branch information
symphorien committed Mar 3, 2024
1 parent 1536926 commit d5850d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/graphics/sane/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d5850d5

Please sign in to comment.