Re: How to handle package udev rules?

2021-12-13 Thread Γυψ
Dear Danny,

thanks! That lead me on the right track. In fact it's just

> sudo -E guix ...

without the Varibale name. "-E" passes the whole environment to
sudo. Now the package works (at least on my system) and the Logitech
presenter can be used under EXWM+xcompmgr under guix-system - Great! I
would be willing to provide the package description and maintain it if
that's helpful. Have to find out about the necessary steps then...

Cheers,
Alex

On Sun, Dec 12 2021, 23:37:06, Danny Milosavljevic  
wrote:

> [[PGP Signed Part:Undecided]]
> Hi,
>
> On Sun, 12 Dec 2021 21:58:14 +0100
> g...@member.fsf.org wrote:
>
>> If I change my operating-system config to inlcude udev-rules from
>> package "projecteur" everything works fine - at least if I do it as a
>> regular user. As soon as I sudo the guix system reconfigure command the
>> package is known but it's code is not. Error message is:
>> 
>> > $ sudo guix system reconfigure ~/etc/config.scm
>> > ice-9/boot-9.scm:3329:6: In procedure resolve-interface:
>> > no code for module (projecteur)  
>> 
>> Could it be the case that sudo'ed the variable GUIX_PACKAGE_PATH is not
>> known or not interpreted correctly? Does the package need to reside
>> somewhere else than in GUIX_PACKAGE_PATH?
>
> Yeah, sudo is very paranoid. You need to pass -E GUIX_PACKAGE_PATH to it:
>
>sudo -E GUIX_PACKAGE_PATH guix system reconfigure ~/etc/config.scm
>
> [[End of PGP Signed Part]]



signature.asc
Description: PGP signature


How to handle package udev rules?

2021-12-12 Thread Γυψ
Sorry, I sent this email from a non-subscribed account and therefore it
probably wasn't sent (if you receive it twice sorry for that).

Dear all,

I'm trying to build my first guix package and so far, after a lot of
trial and error to find the right packages providing the necessary cmake
functionality I managed to get the package to compile. (up to the point
where the install script want's to copy some udev rules file) 

The package is a linux software that can be used with logitech
presenters [0]. Therefore it needs udev rules/devices to communicate
with the device.

The question now is, what is the correct guix-way to implement this:

I tried to import the libgudev module but that that only results in the
package wanting to write to another write-protected directory from the
store.

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?

Or is there another way for a package to provide the udev rules from a
user-level install? 

Cheers,
Alex

-

[0] https://github.com/jahnf/Projecteur