Merge pull request #293022 from symphorien/nixos_module_sane_disabled_backed_word_boundary
nixos/sane: fix disabling backends which are subwords of other backends
This commit is contained in:
commit
439832d6bf
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user