unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob ff8f2a2c1ed22099594f00e7aae5ac04a8d8035e 2076 bytes (raw)
name: gnu/services/spice.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
(define-module (gnu services spice)
  #:use-module (gnu packages spice)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (guix gexp)
  #:use-module (guix records)
  #:export (spice-vdagent-configuration
            spice-vdagent-configuration?
            spice-vdagent-service-type
            spice-vdagent-service))

(define-record-type* <spice-vdagent-configuration>
  spice-vdagent-configuration make-spice-vdagent-configuration
  spice-vdagent-configuration?
  (spice-vdagent spice-vdagent-configuration-spice-vdagent
                 (default spice-vdagent)))

(define (spice-vdagent-activation config)
  "Return the activation gexp for CONFIG."
  #~(mkdir-p "/var/run/spice-vdagentd"))

(define (spice-vdagent-shepherd-service config)
  "Return a <shepherd-service> for spice-vdagentd with CONFIG."
  (define spice-vdagent (spice-vdagent-configuration-spice-vdagent config))

  (define spice-vdagentd-command
    (list
      #~(string-append #$spice-vdagent "/sbin/spice-vdagentd")
      "-x"))

  (list
    (shepherd-service
      (documentation "Spice vdagentd service")
      (requirement '(udev))
      (provision '(spice-vdagentd))
      (start #~(make-forkexec-constructor #$@spice-vdagentd-command))
      (stop #~(make-kill-destructor)))))

(define spice-vdagent-service-type
  (service-type (name 'spice-vdagent)
    (extensions
      (list (service-extension shepherd-root-service-type
                               spice-vdagent-shepherd-service)
            (service-extension activation-service-type
                               spice-vdagent-activation)
            (service-extension profile-service-type
                               (compose list
                                 spice-vdagent-configuration-spice-vdagent))))))

(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))

debug log:

solving ff8f2a2 ...
found ff8f2a2 in https://yhetil.org/guix-devel/20160729082357.17501-8-david@craven.ch/

applying [1/1] https://yhetil.org/guix-devel/20160729082357.17501-8-david@craven.ch/
diff --git a/gnu/services/spice.scm b/gnu/services/spice.scm
new file mode 100644
index 0000000..ff8f2a2

Checking patch gnu/services/spice.scm...
Applied patch gnu/services/spice.scm cleanly.

index at:
100644 ff8f2a2c1ed22099594f00e7aae5ac04a8d8035e	gnu/services/spice.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).