[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to handle package udev rules?
From: |
Tobias Geerinckx-Rice |
Subject: |
Re: How to handle package udev rules? |
Date: |
Sun, 12 Dec 2021 17:24:17 +0100 |
Alexander,
Alexander Asteroth 写道:
The question now is, what is the correct guix-way to implement
this:
Not as complicated as you fear!
udev rules aren't special. Just install them to the package's own
<out>/lib/udev/rules.d directory. If the build system tries to
write to another package's output, see if it provides any options
to change that, or patch it in the worst case.
As I understand, the udev-rules are usually created on system
level. That would mean I need to split the package into a
service part
and a package part? And remove the installation of the udev-file
from
the package install process?
Guix System provides a ready-made udev-rules-service to gather up
all desired udev rules and pass them to the running udev. I think
this is how it works:
(operating-system
[…]
(services
(cons* […]
(udev-rules-service 'projecteur
projecteur)
%base-services)))
‘Think’ because I do it differently in my own configurations.
Or is there another way for a package to provide the udev rules
from a
user-level install?
If this means ‘can I use Guix's udev rules on a foreign
distribution’: I'm not sure, but not out of the box.
Kind regards,
T G-R
signature.asc
Description: PGP signature