nixos/udev: use udev rules from $lib if present, otherwise $out#93006
nixos/udev: use udev rules from $lib if present, otherwise $out#93006flokli wants to merge 1 commit intoNixOS:masterfrom
Conversation
`$bin` is meant for executable binaries, not udev rules, and
`./{lib,etc}/udev/rules.d` also doesn't suggest for these to be in
`$bin`.
4e65995 to
8b9072f
Compare
|
I'd also be fine with this being |
Valodim
left a comment
There was a problem hiding this comment.
This seems like it might be a reasonable change. Some considerations:
- If we want to separate out udev rules, perhaps a
udevoutput makes sense? I just checked and moolticute actually does this already, and seabreeze used to. The only reason to call this "lib" is FHS heritage, iinm, and a udev output feels more "typesafe", in a way. - On the other hand, I suspect udev rules commonly trigger binaries, which will then be in their
binoutput, so we will anyways have that dependency in the majority of cases.
Either way, before merging this we need to make sure this doesn't break any packaged rules. Did you check that there is no derivation (besides bluez-qt) that packages its udev files into bin? I spotted libmtp as a candidate with nix-locate, at least.
| @@ -190,7 +190,7 @@ in | |||
| <filename><replaceable>pkg</replaceable>/lib/udev/rules.d</filename> | |||
| will be included. | |||
There was a problem hiding this comment.
This documentation should definitely mention that this applies to files from the lib or default output.
| <listitem> | ||
| <para> | ||
| In the case of multiple output derivations, the <link linkend="opt-services.udev.packages">services.udev.packages</link> option | ||
| now takes udev rules from <literal>lib</literal>, not <literal>bin</literal>. |
There was a problem hiding this comment.
| now takes udev rules from <literal>lib</literal>, not <literal>bin</literal>. | |
| now takes udev rules from the <literal>lib</literal>, <literal>out</literal>, or default output (in that order), not <literal>bin</literal>. |
|
Hm, a Also, the same might apply for
|
|
In a discussion on |
|
I'm still not sure which output to best put this into, and it certainly won't happen in 20.09 either. Let's close this for the time being. |
$binis meant for executable binaries, not udev rules, and./{lib,etc}/udev/rules.dalso doesn't suggest for these to be in$bin.Motivation for this change
I was packaging something with multiple outputs and both
$binand$liboutputs, and was wondering myself a lot on why they weren't picked up.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)