From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] Export udev-configuration functions. Date: Wed, 18 Nov 2015 22:28:54 +0100 Message-ID: <87h9kjhu95.fsf@gnu.org> References: <874mgjk0ip.fsf@elephly.net> <87610zp4wg.fsf@gnu.org> <87bnarj9zf.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzAHk-0005sc-AX for guix-devel@gnu.org; Wed, 18 Nov 2015 16:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzAHh-0000rj-1n for guix-devel@gnu.org; Wed, 18 Nov 2015 16:29:00 -0500 In-Reply-To: <87bnarj9zf.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 18 Nov 2015 22:03:48 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> We should factorize this so one can write: >> >> (udev-rule "90-avrispmkii.rules" >> "SUBSYSTEM !=3D =E2=80=A6") >> >> Because here it=E2=80=99s arguably sufficiently verbose to discourage ne= wcomers. >> :-) > > Patch attached. Is this okay? > > From 77f22cb933a9740cccc62f6bac2d3f9381192eba Mon Sep 17 00:00:00 2001 > From: Ricardo Wurmus > 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 =E2=80=9Cfile-name=E2=80=9D (sorry for being pedantic ;-)). > +(define (kvm-udev-rule) This can even become a plain variable. Otherwise LGTM! > > That=E2=80=99s one way do do it. > > > > Another one would be to write an avrispmkii service that would extend > > =E2=80=98udev-service-type=E2=80=99 by passing it its rule (and maybe i= t could do other > > useful things as well?) >=20 > 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=E2=80=99.