NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.07k stars 14.12k forks source link

usb_modeswitch_data udev rules aren't applied #60878

Closed nyanloutre closed 4 years ago

nyanloutre commented 5 years ago

Issue description

Hello, I am using a Logitech G920 which should be configured by usb_modeswitch.

I added usb-modeswitch-data to the udev rules, it shows up in /etc/udev but nothing gets applied.

By looking at how the package is made it seems it is incorectly patching the udev file: originally it would call a script (/lib/udev/usb_modeswitch) but it is replaced by the usb_modeswitch executable (/bin/usb_modeswitch) without changing the arguments.

But the script will not work as it is because /bin/usb_modeswitch_dispatcher (which is called by /lib/udev/usb_modeswitch) will try to access a lot of hardcoded paths (like /usr/share/usb_modeswitch or /usr/sbin/usb_modeswitch).

Steps to reproduce

hardware.usbWwan.enable=true;

michalrus commented 4 years ago

I think this can be closed — after #60981 everything seems to work.