New Package That Manipulates Udev

I want to build a derivation that makes udev changes. Is there something additional I need to consider in such a case? Does it involve:

https://github.com/NixOS/nixpkgs/blob/0bfd0187dafe3f597355e6be16b7b9a5f4b90376/nixos/modules/services/hardware/udev.nix

somehow?

(BTW, the package in question is midisport-firmware.)

I had a look and the consensus seems to be to add udev rules to $out/lib/udev/rules.d/ and then add the package to services.udev.packages = [ my-package ]; either directly in configuration.nix or through a module. Below is a couple of example packages that do this.

1 Like

Thanks very much!

Let me chew on that a bit and try it. I’ll report my results back here.

OK, I haven’t had a chance to try this yet because there’s also a firmware component that must be built. The package depends up fxload, which is available. I just need to get a better understanding about how that works in a NixOS context.