From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6OYM-00016N-W6 for guix-patches@gnu.org; Sun, 22 Oct 2017 18:17:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6OYI-0005qt-6e for guix-patches@gnu.org; Sun, 22 Oct 2017 18:17:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47658) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6OYI-0005qp-3F for guix-patches@gnu.org; Sun, 22 Oct 2017 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6OYH-0006zF-Th for guix-patches@gnu.org; Sun, 22 Oct 2017 18:17:01 -0400 Subject: [bug#28647] [PATCH] services: base: Add file->udev-rule function. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgkxxzr1.fsf@gmail.com> <87bmlo74jq.fsf@gnu.org> Date: Sun, 22 Oct 2017 15:16:28 -0700 In-Reply-To: <87bmlo74jq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 03 Oct 2017 15:18:49 +0200") Message-ID: <87wp3mygjn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Maxim Cournoyer Cc: 28647@debbugs.gnu.org Hey Maxim, Just a friendly reminder. :-) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Hi Maxim, > > Maxim Cournoyer skribis: > >> While experimenting with udev rules, I found a need to be able to pass >> file-like objects containing udev rules to the udev-service. This patch >> implements a `file->udev-rule' method that does just that. > > Looks useful! > >> From 050e96b3325f851f3118de0c881d25796d76049b Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer >> Date: Wed, 27 Sep 2017 21:33:25 -0400 >> Subject: [PATCH] services: base: Add file->udev-rule function. >> >> This function allows passing a file-like object to the udev service. >> >> * gnu/services/base.scm (file->udev-rule): New function. >> * doc/guix.texi (Base Services): Document it. > > [...] > >> -@deffn {Scheme Procedure} udev-service [#:udev udev] >> +@deffn {Scheme Procedure} udev-service [#:udev @var{eudev} #:rules @cod= e{'()}] >> Run @var{udev}, which populates the @file{/dev} directory dynamically. >> +Packages can be included in the @var{rules} list in order to extend the >> +udev rules with the definitions found under their >> +@file{lib/udev/rules.d} sub-directory. >> + >> +The functions @code{udev-rules} and @code{file->udev-rules} from >> +@code{(gnu services base)} can be used to create rule objects based on a >> +string or a file-like object, respectively. Those rule objects can be >> +passed to udev-service just like packages. > > Could you document the procedures with @deffn so that they have an entry > in the index? > > @deffn {Scheme Procedure} udev-rules @var{rules} > =E2=80=A6 > @end deffn > > @deffn {Scheme Procedure} file->udev-rules @var{files} > Similar to @code{udev-rules}, but=E2=80=A6 > @end deffn > > TIA! > > Ludo=E2=80=99. ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Also, could you add an example in guix.texi that shows the use of the > Android udev rules that you submitted separately? > > Thanks, > Ludo=E2=80=99.