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>
4 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages spice)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages cyrus-sasl)
25 #:use-module (gnu packages gl)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages gnome)
28 #:use-module (gnu packages gstreamer)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages image)
31 #:use-module (gnu packages libusb)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages pulseaudio)
35 #:use-module (gnu packages python)
36 #:use-module (gnu packages tls)
37 #:use-module (gnu packages xorg)
38 #:use-module (gnu packages xdisorg)
39 #:use-module (gnu packages xiph)
40 #:use-module (gnu packages xml)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix download)
43 #:use-module (guix packages)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils))
47 (define-public usbredir
50 (home-page "https://spice-space.org")
54 (uri (string-append home-page "/download/" name "/" name "-"
58 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
59 (build-system gnu-build-system)
61 `(("libusb" ,libusb)))
63 `(("pkg-config" ,pkg-config)))
64 (synopsis "Tools for sending USB device traffic over a network")
66 "Usbredir is a network protocol for sending USB device traffic over a
67 network connection. It can be used to redirect traffic from a USB device to a
68 different (virtual) machine than the one to which the USB device is attached.")
69 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
71 (define-public virglrenderer
73 (name "virglrenderer")
78 "https://www.freedesktop.org/software/virgl/"
79 "virglrenderer-" version ".tar.bz2"))
80 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
83 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
84 (build-system gnu-build-system)
86 `(("libepoxy" ,libepoxy)
90 `(("pkg-config" ,pkg-config)))
91 (synopsis "Virtual 3D GPU library")
92 (description "A virtual 3D GPU library that enables a virtualized operating
93 system to use the host GPU to accelerate 3D rendering.")
94 (home-page "https://virgil3d.github.io")
95 (license (list license:expat license:bsd-3))))
97 (define-public spice-protocol
99 (name "spice-protocol")
104 "https://www.spice-space.org/download/releases/"
105 "spice-protocol-" version ".tar.bz2"))
108 "06b461i4jv741in8617jjpfk28wk7zs9p7841njkf4sbm8xv4kcb"))))
109 (build-system gnu-build-system)
110 (synopsis "Protocol headers for the SPICE protocol")
111 (description "SPICE (the Simple Protocol for Independent Computing
112 Environments) is a remote-display system built for virtual environments
113 which allows users to view a desktop computing environment.")
114 (home-page "https://www.spice-space.org")
115 (license (list license:bsd-3 license:lgpl2.1+))))
117 (define-public spice-gtk
124 "https://spice-space.org/download/gtk/"
125 "spice-gtk-" version ".tar.bz2"))
128 "1kfpixfdmxs9wn3id48gc9bvfrgxz935y3wpykf40bgi9mcc69ki"))))
129 (build-system gnu-build-system)
131 `(("gstreamer" ,gstreamer)
132 ("gst-libav" ,gst-libav)
133 ("gst-plugins-base" ,gst-plugins-base)
134 ("gst-plugins-good" ,gst-plugins-good)
135 ("gst-plugins-bad" ,gst-plugins-bad)
136 ("gst-plugins-ugly" ,gst-plugins-ugly)
137 ("spice-protocol" ,spice-protocol)
139 ;; These are required by the pkg-config files.
142 ("openssl" ,openssl)))
144 `(("glib-networking" ,glib-networking)
145 ("gobject-introspection" ,gobject-introspection)
146 ("json-glib" ,json-glib)
147 ("libepoxy" ,libepoxy)
152 ("pulseaudio" ,pulseaudio)
155 ("usbredir" ,usbredir)))
157 `(("glib:bin" ,glib "bin")
158 ("intltool" ,intltool)
159 ("pkg-config" ,pkg-config)))
162 '("--enable-gstaudio"
165 "--enable-introspection")
167 (modify-phases %standard-phases
168 (add-before 'check 'disable-session-test
170 ;; XXX: Disable session tests, because they require USB support,
171 ;; which is not available in the build container.
172 (substitute* "tests/Makefile"
173 (("test-session\\$\\(EXEEXT\\) ") ""))
177 (lambda* (#:key inputs outputs #:allow-other-keys)
178 (let ((out (assoc-ref outputs "out"))
179 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
180 (wrap-program (string-append out "/bin/spicy")
181 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
183 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
184 (description "Gtk client and libraries for SPICE remote desktop servers.")
185 (home-page "https://www.spice-space.org")
186 (license (list license:lgpl2.1+ license:lgpl2.0+))))
195 "https://www.spice-space.org/download/releases/"
196 "spice-server/spice-" version ".tar.bz2"))
199 "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y"))))
200 (build-system gnu-build-system)
202 `(("openssl" ,openssl)
204 ("spice-protocol" ,spice-protocol)))
206 `(("cyrus-sasl" ,cyrus-sasl)
208 ("libjpeg-turbo" ,libjpeg-turbo)
214 `(("pkg-config" ,pkg-config)
216 ("spice-gtk" ,spice-gtk)
218 ;; These are needed for the server listen tests.
219 ("glib-networking" ,glib-networking)
220 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
224 "--enable-automated-tests")
226 ;; Several tests appear to be opening the same sockets concurrently.
227 #:parallel-tests? #f))
228 (synopsis "Server implementation of the SPICE protocol")
229 (description "SPICE is a remote display system built for virtual
230 environments which allows you to view a computing @code{desktop} environment
231 not only on the machine where it is running, but from anywhere on the
232 Internet and from a wide variety of machine architectures.")
233 (home-page "https://www.spice-space.org")
234 (license (list license:lgpl2.1+ license:lgpl2.0+))))
236 (define-public spice-vdagent
238 (name "spice-vdagent")
243 "http://www.spice-space.org/download/releases/"
244 "spice-vdagent-" version ".tar.bz2"))
247 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
248 (build-system gnu-build-system)
251 '("--localstatedir=/var")
253 (modify-phases %standard-phases
254 (add-after 'unpack 'patch-makefile.in
256 (substitute* "Makefile.in"
257 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
258 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
259 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
261 (add-after 'unpack 'patch-spice-vdagent.desktop
262 (lambda* (#:key outputs #:allow-other-keys)
263 (substitute* "data/spice-vdagent.desktop"
264 (("Exec=/usr/bin/spice-vdagent")
265 (string-append "Exec=" (assoc-ref outputs "out")
266 "/bin/spice-vdagent")))
269 `(("alsa-lib" ,alsa-lib)
272 ("libpciaccess" ,libpciaccess)
275 ("libxfixes" ,libxfixes)
276 ("libxinerama" ,libxinerama)
277 ("libxrandr" ,libxrandr)
278 ("spice-protocol" ,spice-protocol)))
280 `(("pkg-config" ,pkg-config)))
281 (synopsis "Spice agent for Linux")
282 (description "Spice-vdagent enables sharing the clipboard and guest display
283 resolution scaling on graphical console window resize.")
284 (home-page "https://www.spice-space.org")
285 (license license:gpl3+)))
287 (define-public virt-viewer
294 "https://virt-manager.org/download/sources/virt-viewer/"
295 "virt-viewer-" version ".tar.gz"))
298 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
299 (build-system gnu-build-system)
304 ("spice-gtk" ,spice-gtk)))
306 `(("glib:bin" ,glib "bin")
307 ("intltool" ,intltool)
308 ("pkg-config" ,pkg-config)))
311 '("--with-spice-gtk")
313 (modify-phases %standard-phases
315 'install 'wrap-remote-viewer
316 (lambda* (#:key inputs outputs #:allow-other-keys)
317 (let ((out (assoc-ref outputs "out"))
318 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
319 (wrap-program (string-append out "/bin/remote-viewer")
320 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
322 (synopsis "Graphical console client for virtual machines")
323 (description "Graphical console client for virtual machines using SPICE or
325 (home-page "https://virt-manager.org")
326 (license license:gpl2+)))