David Craven <da...@craven.ch> 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 > architectures.") > (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)" > "\\$\\(localstatedir\\)/run/spice-vdagentd")) > "-$(mkdir_p) > $(DESTDIR)$(localstatedir)/run/spice-vdagentd")) > + #t)) > + (add-after 'unpack 'patch-spice-vdagent.desktop > + (lambda _ > + (substitute* "data/spice-vdagent.desktop" > + (("Exec=/usr/bin/spice-vdagent\n") "Exec=spice-vdagent\n")) What about: (lambda* (#:key outputs #:allow-other-keys) (substitute* … (… (string-append "Exec=" (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 “Services”, 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’.