New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/udev: use udev rules from $lib if present, otherwise $out #93006
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it might be a reasonable change. Some considerations:
- If we want to separate out udev rules, perhaps a
udev
output 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
bin
output, 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
$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
.Motivation for this change
I was packaging something with multiple outputs and both
$bin
and$lib
outputs, and was wondering myself a lot on why they weren't picked up.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)