Skip to content

Commit

Permalink
Merge pull request #293022 from symphorien/nixos_module_sane_disabled…
Browse files Browse the repository at this point in the history
…_backed_word_boundary

nixos/sane: fix disabling backends which are subwords of other backends
  • Loading branch information
drupol authored Jun 1, 2024
2 parents c04189d + d5850d5 commit 439832d
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 439832d

Please sign in to comment.