You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /etc/sane-config/dll.conf file lists enabled backends, with one backend per line. The hardware.sane.disabledDefaultBackends option uses string substitution to edit this file. But as it does not take into account line endings, disabling a backend x also affects other backends that contain the string x.
Steps To Reproduce
Steps to reproduce the behavior:
Set hardware.sane.enabled = true; in /etc/nixos/configuration.nix and observe the generated dll.conf:
$ diff /nix/store/{hb5yn5874izgjychgfjgkjbf0igz9ivk,116ir7mwgfnwji955sjblyz0fla87933}-sane-config/etc/sane.d/dll.conf
7,8c7,8
< # The next line enables the network backend; comment it out if you don't
< # need to use a remote SANE scanner over the network -- see sane-net(5)
---
> # The next line enables the # net disabled in nixos configwork backend; comment it out if you don't
> # need to use a remote SANE scanner over the # net disabled in nixos configwork -- see sane-# net disabled in nixos config(5)
10c10
< net
---
> # net disabled in nixos config
31c31
< dell1600n_net
---
> dell1600n_# net disabled in nixos config
Expected behavior
Instead of mangling the dell1600n_net driver, only the net driver should be disabled.
Additional context
This is the code that performs the string substition:
Describe the bug
The
/etc/sane-config/dll.conf
file lists enabled backends, with one backend per line. Thehardware.sane.disabledDefaultBackends
option uses string substitution to edit this file. But as it does not take into account line endings, disabling a backend x also affects other backends that contain the string x.Steps To Reproduce
Steps to reproduce the behavior:
hardware.sane.enabled = true;
in/etc/nixos/configuration.nix
and observe the generateddll.conf
:hardware.sane.disabledDefaultBackends = [ "net" ];
and repeat:Expected behavior
Instead of mangling the
dell1600n_net
driver, only thenet
driver should be disabled.Additional context
This is the code that performs the string substition:
nixpkgs/pkgs/applications/graphics/sane/config.nix
Line 33 in b7535c4
It should probably use something like
^backend$
instead, though I don’t know how this could be expressed here.On a related note, it would be great to have an option to disable all default backends and manually select the backends to enable.
Notify maintainers
@symphorien (pinging because of c64fb50)
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: