NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.13k forks source link

brscan5 generates stale links for `brother5.conf` #219871

Open oleid opened 1 year ago

oleid commented 1 year ago

Issue description

When using brscan5 package, I get the following link:

brother5.conf -> /etc/static/sane.d/dll.d/brother5.conf

inside /etc/sane.d/dll.d

That file itself is a link

/etc/static/sane.d/dll.d/brother5.conf -> /nix/store/wk7idr3s7d3842q3lc4dxi1kfw9qs5w4-brscan5-1.2.9-0/etc/sane.d/dll.d/brother.conf

But there is no file called brother.conf in that folder. Only brother5.conf whose content is brother5.

It does not affect operation, it would seem -- I can use the scanner. But since the scanner didn't work at first, and this stale link was the first obvious broken thing, I spent some time finding out what was wrong.

Steps to reproduce

I used the following config

  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix>
    ];

[...]

  hardware.sane = {
    enable = true;
    brscan5 = {
      enable = true;
      netDevices = {
        home = { model = "ADS-1700"; ip = "192.168.178.50"; };
      };
    };
  };

Technical details

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.97, NixOS, 22.11 (Raccoon), 22.11.2979.47c00341629`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixos-22.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
swflint commented 1 year ago

How were you able to get the scanner working with the stale link? Or is fixing it sufficient?

swflint commented 8 months ago

This stale link still seems to exist, and appears that it may be causing problems with some scanners.