unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Export udev-configuration functions.
Date: Wed, 18 Nov 2015 22:28:54 +0100	[thread overview]
Message-ID: <87h9kjhu95.fsf@gnu.org> (raw)
In-Reply-To: <87bnarj9zf.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 18 Nov 2015 22:03:48 +0100")

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ludovic Courtès <ludo@gnu.org> 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 <rekado@elephly.net>
> 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	other threads:[~2015-11-18 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 11:30 [PATCH] Export udev-configuration functions Ricardo Wurmus
2015-11-18 17:57 ` Ludovic Courtès
2015-11-18 21:03   ` Ricardo Wurmus
2015-11-18 21:28     ` Ludovic Courtès [this message]
2015-11-19 16:08       ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9kjhu95.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).