1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Craven <david@craven.ch>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages spice)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages compression)
23 #:use-module (gnu packages cyrus-sasl)
24 #:use-module (gnu packages gl)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages gnome)
27 #:use-module (gnu packages gstreamer)
28 #:use-module (gnu packages gtk)
29 #:use-module (gnu packages image)
30 #:use-module (gnu packages libusb)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages pulseaudio)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages tls)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages xdisorg)
38 #:use-module (gnu packages xiph)
39 #:use-module (gnu packages xml)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix download)
42 #:use-module (guix packages)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix utils))
46 (define-public usbredir
49 (home-page "https://spice-space.org")
53 (uri (string-append home-page "/download/" name "/" name "-"
57 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
58 (build-system gnu-build-system)
60 `(("libusb" ,libusb)))
62 `(("pkg-config" ,pkg-config)))
63 (synopsis "Tools for sending USB device traffic over a network")
65 "Usbredir is a network protocol for sending USB device traffic over a
66 network connection. It can be used to redirect traffic from a USB device to a
67 different (virtual) machine than the one to which the USB device is attached.")
68 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
70 (define-public virglrenderer
72 (name "virglrenderer")
77 "https://www.freedesktop.org/software/virgl/"
78 "virglrenderer-" version ".tar.bz2"))
79 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
82 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
83 (build-system gnu-build-system)
85 `(("libepoxy" ,libepoxy)
89 `(("pkg-config" ,pkg-config)))
90 (synopsis "Virtual 3D GPU library")
91 (description "A virtual 3D GPU library that enables a virtualized operating
92 system to use the host GPU to accelerate 3D rendering.")
93 (home-page "https://virgil3d.github.io")
94 (license (list license:expat license:bsd-3))))
96 (define-public spice-protocol
98 (name "spice-protocol")
103 "https://www.spice-space.org/download/releases/"
104 "spice-protocol-" version ".tar.bz2"))
107 "170ckpgazvqv7hxy209myg67pqnd6c0gvr4ysbqgsfch6320nd90"))))
108 (build-system gnu-build-system)
109 (synopsis "Protocol headers for the SPICE protocol")
110 (description "SPICE (the Simple Protocol for Independent Computing
111 Environments) is a remote-display system built for virtual environments
112 which allows users to view a desktop computing environment.")
113 (home-page "https://www.spice-space.org")
114 (license (list license:bsd-3 license:lgpl2.1+))))
116 (define-public spice-gtk
123 "https://spice-space.org/download/gtk/"
124 "spice-gtk-" version ".tar.bz2"))
127 "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml"))))
128 (build-system gnu-build-system)
130 `(("gstreamer" ,gstreamer)
131 ("gst-libav" ,gst-libav)
132 ("gst-plugins-base" ,gst-plugins-base)
133 ("gst-plugins-good" ,gst-plugins-good)
134 ("gst-plugins-bad" ,gst-plugins-bad)
135 ("gst-plugins-ugly" ,gst-plugins-ugly)
136 ("spice-protocol" ,spice-protocol)))
138 `(("glib-networking" ,glib-networking)
139 ("gobject-introspection" ,gobject-introspection)
141 ("libepoxy" ,libepoxy)
147 ("pulseaudio" ,pulseaudio)
151 ("usbredir" ,usbredir)))
153 `(("glib:bin" ,glib "bin")
154 ("intltool" ,intltool)
155 ("pkg-config" ,pkg-config)))
158 '("--enable-gstaudio"
161 "--enable-introspection")
163 (modify-phases %standard-phases
166 (lambda* (#:key inputs outputs #:allow-other-keys)
167 (let ((out (assoc-ref outputs "out"))
168 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
169 (wrap-program (string-append out "/bin/spicy")
170 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
172 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
173 (description "Gtk client and libraries for SPICE remote desktop servers.")
174 (home-page "https://www.spice-space.org")
175 (license (list license:lgpl2.1+ license:lgpl2.0+))))
184 "https://www.spice-space.org/download/releases/"
185 "spice-server/spice-" version ".tar.bz2"))
188 "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y"))))
189 (build-system gnu-build-system)
191 `(("openssl" ,openssl)
193 ("spice-protocol" ,spice-protocol)))
195 `(("cyrus-sasl" ,cyrus-sasl)
197 ("libjpeg-turbo" ,libjpeg-turbo)
203 `(("pkg-config" ,pkg-config)
205 ("spice-gtk" ,spice-gtk)
207 ;; These are needed for the server listen tests.
208 ("glib-networking" ,glib-networking)
209 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
213 "--enable-automated-tests")
215 ;; Several tests appear to be opening the same sockets concurrently.
218 #:phases (modify-phases %standard-phases
219 (add-before 'check 'use-empty-ssl-cert-file
220 (lambda _ (setenv "SSL_CERT_FILE" "/dev/null") #t)))))
221 (synopsis "Server implementation of the SPICE protocol")
222 (description "SPICE is a remote display system built for virtual
223 environments which allows you to view a computing 'desktop' environment
224 not only on the machine where it is running, but from anywhere on the
225 Internet and from a wide variety of machine architectures.")
226 (home-page "https://www.spice-space.org")
227 (license (list license:lgpl2.1+ license:lgpl2.0+))))
229 (define-public spice-vdagent
231 (name "spice-vdagent")
236 "http://www.spice-space.org/download/releases/"
237 "spice-vdagent-" version ".tar.bz2"))
240 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
241 (build-system gnu-build-system)
244 '("--localstatedir=/var")
246 (modify-phases %standard-phases
247 (add-after 'unpack 'patch-makefile.in
249 (substitute* "Makefile.in"
250 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
251 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
252 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
254 (add-after 'unpack 'patch-spice-vdagent.desktop
255 (lambda* (#:key outputs #:allow-other-keys)
256 (substitute* "data/spice-vdagent.desktop"
257 (("Exec=/usr/bin/spice-vdagent")
258 (string-append "Exec=" (assoc-ref outputs "out")
259 "/bin/spice-vdagent")))
262 `(("alsa-lib" ,alsa-lib)
265 ("libpciaccess" ,libpciaccess)
268 ("libxfixes" ,libxfixes)
269 ("libxinerama" ,libxinerama)
270 ("libxrandr" ,libxrandr)
271 ("spice-protocol" ,spice-protocol)))
273 `(("pkg-config" ,pkg-config)))
274 (synopsis "Spice agent for Linux")
275 (description "Spice-vdagent enables sharing the clipboard and guest display
276 resolution scaling on graphical console window resize.")
277 (home-page "https://www.spice-space.org")
278 (license license:gpl3+)))
280 (define-public virt-viewer
287 "https://virt-manager.org/download/sources/virt-viewer/"
288 "virt-viewer-" version ".tar.gz"))
291 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
292 (build-system gnu-build-system)
298 ("spice-gtk" ,spice-gtk)))
300 `(("glib:bin" ,glib "bin")
301 ("intltool" ,intltool)
302 ("pkg-config" ,pkg-config)))
305 '("--with-spice-gtk")
307 (modify-phases %standard-phases
309 'install 'wrap-remote-viewer
310 (lambda* (#:key inputs outputs #:allow-other-keys)
311 (let ((out (assoc-ref outputs "out"))
312 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
313 (wrap-program (string-append out "/bin/remote-viewer")
314 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
316 (synopsis "Graphical console client for virtual machines")
317 (description "Graphical console client for virtual machines using SPICE or
319 (home-page "https://virt-manager.org")
320 (license license:gpl2+)))