guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Export udev-configuration functions.


From: Ludovic Courtès
Subject: Re: [PATCH] Export udev-configuration functions.
Date: Wed, 18 Nov 2015 22:28:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ricardo Wurmus <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:
>
>> We should factorize this so one can write:
>>
>>   (udev-rule "90-avrispmkii.rules"
>>              "SUBSYSTEM != …")
>>
>> Because here it’s arguably sufficiently verbose to discourage newcomers.
>> :-)
>
> Patch attached.  Is this okay?
>
> From 77f22cb933a9740cccc62f6bac2d3f9381192eba Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Wed, 18 Nov 2015 21:58:53 +0100
> Subject: [PATCH] services: Add udev-rule procedure.
>
> * gnu/services/base.scm (udev-rule): New procedure.
> (kvm-udev-rule): Rewrite in terms of udev-rule.

[...]

> +(define (udev-rule filename contents)
> +  "Return a directory with a udev rule file FILENAME containing CONTENTS."

Rather “file-name” (sorry for being pedantic ;-)).

> +(define (kvm-udev-rule)

This can even become a plain variable.

Otherwise LGTM!

> > That’s one way do do it.
> >
> > Another one would be to write an avrispmkii service that would extend
> > ‘udev-service-type’ by passing it its rule (and maybe it could do other
> > useful things as well?)
> 
> I did this first but then it seemed overly complicated when there
> already is a service that does almost exactly what I want.

Yeah, makes sense!

Thank you,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]