From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 8/8] services: Add spice vdagent service. Date: Fri, 29 Jul 2016 21:16:42 +0200 Message-ID: <87r3acxnj9.fsf@gnu.org> References: <20160729082357.17501-1-david@craven.ch> <20160729082357.17501-8-david@craven.ch> 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]:45393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTDH8-0000jF-Ae for guix-devel@gnu.org; Fri, 29 Jul 2016 15:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTDH3-0004ob-HR for guix-devel@gnu.org; Fri, 29 Jul 2016 15:16:49 -0400 In-Reply-To: <20160729082357.17501-8-david@craven.ch> (David Craven's message of "Fri, 29 Jul 2016 10:23:57 +0200") 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" To: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * gnu/services/spice.scm: New file. > * gnu/packages/spice.scm (spice-vdagent): Set Exec path in > spice-vdagent.desktop. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. [...] > --- a/gnu/packages/spice.scm > +++ b/gnu/packages/spice.scm > @@ -235,6 +235,11 @@ Internet and from a wide variety of machine architec= tures.") > (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)" > "\\$\\(localstatedir\\)/run/spice-vdagen= td")) > "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdage= ntd")) > + #t)) > + (add-after 'unpack 'patch-spice-vdagent.desktop > + (lambda _ > + (substitute* "data/spice-vdagent.desktop" > + (("Exec=3D/usr/bin/spice-vdagent\n") "Exec=3Dspice-vdag= ent\n")) What about: (lambda* (#:key outputs #:allow-other-keys) (substitute* =E2=80=A6 (=E2=80=A6 (string-append "Exec=3D" (assoc-ref outputs "out") "/bin/spice-vdagent"))) #t) ? Also, I think this should be a separate patch as it seems to be unrelated. > diff --git a/gnu/services/spice.scm b/gnu/services/spice.scm > new file mode 100644 > index 0000000..ff8f2a2 > --- /dev/null > +++ b/gnu/services/spice.scm > @@ -0,0 +1,55 @@ Please add a license header. > + (list > + (shepherd-service > + (documentation "Spice vdagentd service") > + (requirement '(udev)) > + (provision '(spice-vdagentd)) > + (start #~(make-forkexec-constructor #$@spice-vdagentd-command)) If spice-vdagend produces a PID file, make sure to use #:pid-file here (there are several examples in the tree), which often provides more reliable startup notification. > +(define* (spice-vdagent-service > + #:optional (config (spice-vdagent-configuration))) > + "Start the @command{vdagentd} and @command{vdagent} deamons > +from @var{spice-vdagent} to enable guest window resizing and > +clipboard sharing." > + (service spice-vdagent-service-type config)) Could you add documentation to doc/guix.texi under =E2=80=9CServices=E2=80= =9D, either in an existing subsection or in a new one if that seems appropriate. Make sure to add one or two sentences to give context, and an @uref link to the relevant Spice documentation. Could you send updated patches? Thanks! Ludo=E2=80=99.