gnu: spice: Update to 0.14.2 [fixes CVE-2019-3813].
[jackhill/guix/guix.git] / gnu / packages / spice.scm
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>
5 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages spice)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages cyrus-sasl)
26 #:use-module (gnu packages gl)
27 #:use-module (gnu packages glib)
28 #:use-module (gnu packages gnome)
29 #:use-module (gnu packages gstreamer)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages image)
32 #:use-module (gnu packages libusb)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages pulseaudio)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages tls)
38 #:use-module (gnu packages xorg)
39 #:use-module (gnu packages xdisorg)
40 #:use-module (gnu packages xiph)
41 #:use-module (gnu packages xml)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix download)
44 #:use-module (guix packages)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils))
47
48 (define-public usbredir
49 (package
50 (name "usbredir")
51 (home-page "https://spice-space.org")
52 (version "0.8.0")
53 (source (origin
54 (method url-fetch)
55 (uri (string-append home-page "/download/" name "/" name "-"
56 version ".tar.bz2"))
57 (sha256
58 (base32
59 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
60 (build-system gnu-build-system)
61 (propagated-inputs
62 `(("libusb" ,libusb)))
63 (native-inputs
64 `(("pkg-config" ,pkg-config)))
65 (synopsis "Tools for sending USB device traffic over a network")
66 (description
67 "Usbredir is a network protocol for sending USB device traffic over a
68 network connection. It can be used to redirect traffic from a USB device to a
69 different (virtual) machine than the one to which the USB device is attached.")
70 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
71
72 (define-public virglrenderer
73 (package
74 (name "virglrenderer")
75 (version "0.6.0")
76 (source (origin
77 (method url-fetch)
78 (uri (string-append
79 "https://www.freedesktop.org/software/virgl/"
80 "virglrenderer-" version ".tar.bz2"))
81 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
82 (sha256
83 (base32
84 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
85 (build-system gnu-build-system)
86 (inputs
87 `(("libepoxy" ,libepoxy)
88 ("mesa" ,mesa)
89 ("udev" ,eudev)))
90 (native-inputs
91 `(("pkg-config" ,pkg-config)))
92 (synopsis "Virtual 3D GPU library")
93 (description "A virtual 3D GPU library that enables a virtualized operating
94 system to use the host GPU to accelerate 3D rendering.")
95 (home-page "https://virgil3d.github.io")
96 (license (list license:expat license:bsd-3))))
97
98 (define-public spice-protocol
99 (package
100 (name "spice-protocol")
101 (version "0.14.0")
102 (source (origin
103 (method url-fetch)
104 (uri (string-append
105 "https://www.spice-space.org/download/releases/"
106 "spice-protocol-" version ".tar.bz2"))
107 (sha256
108 (base32
109 "1b3f44c13pqsp7aabmcinfbmgl79038bp5548l5pjs16lcfam95n"))))
110 (build-system gnu-build-system)
111 (synopsis "Protocol headers for the SPICE protocol")
112 (description "SPICE (the Simple Protocol for Independent Computing
113 Environments) is a remote-display system built for virtual environments
114 which allows users to view a desktop computing environment.")
115 (home-page "https://www.spice-space.org")
116 (license (list license:bsd-3 license:lgpl2.1+))))
117
118 (define-public spice-protocol-0.12
119 (package
120 (inherit spice-protocol)
121 (version "0.12.15")
122 (source (origin
123 (method url-fetch)
124 (uri (string-append
125 "https://www.spice-space.org/download/releases/"
126 "spice-protocol-" version ".tar.bz2"))
127 (sha256
128 (base32
129 "06b461i4jv741in8617jjpfk28wk7zs9p7841njkf4sbm8xv4kcb"))))))
130
131 (define-public spice-gtk
132 (package
133 (name "spice-gtk")
134 (version "0.36")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
138 "https://spice-space.org/download/gtk/"
139 "spice-gtk-" version ".tar.bz2"))
140 (sha256
141 (base32
142 "1kfpixfdmxs9wn3id48gc9bvfrgxz935y3wpykf40bgi9mcc69ki"))))
143 (build-system gnu-build-system)
144 (propagated-inputs
145 `(("gstreamer" ,gstreamer)
146 ("gst-libav" ,gst-libav)
147 ("gst-plugins-base" ,gst-plugins-base)
148 ("gst-plugins-good" ,gst-plugins-good)
149 ("gst-plugins-bad" ,gst-plugins-bad)
150 ("gst-plugins-ugly" ,gst-plugins-ugly)
151 ("spice-protocol" ,spice-protocol-0.12)
152
153 ;; These are required by the pkg-config files.
154 ("gtk+" ,gtk+)
155 ("pixman" ,pixman)
156 ("openssl" ,openssl)))
157 (inputs
158 `(("glib-networking" ,glib-networking)
159 ("gobject-introspection" ,gobject-introspection)
160 ("json-glib" ,json-glib)
161 ("libepoxy" ,libepoxy)
162 ("libjpeg" ,libjpeg)
163 ("libxcb" ,libxcb)
164 ("lz4" ,lz4)
165 ("mesa" ,mesa)
166 ("pulseaudio" ,pulseaudio)
167 ("python" ,python)
168 ("opus" ,opus)
169 ("usbredir" ,usbredir)))
170 (native-inputs
171 `(("glib:bin" ,glib "bin")
172 ("intltool" ,intltool)
173 ("pkg-config" ,pkg-config)))
174 (arguments
175 `(#:configure-flags
176 '("--enable-gstaudio"
177 "--enable-gstvideo"
178 "--enable-pulse"
179 "--enable-introspection")
180 #:phases
181 (modify-phases %standard-phases
182 (add-before 'check 'disable-session-test
183 (lambda _
184 ;; XXX: Disable session tests, because they require USB support,
185 ;; which is not available in the build container.
186 (substitute* "tests/Makefile"
187 (("test-session\\$\\(EXEEXT\\) ") ""))
188 #t))
189 (add-after
190 'install 'wrap-spicy
191 (lambda* (#:key inputs outputs #:allow-other-keys)
192 (let ((out (assoc-ref outputs "out"))
193 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
194 (wrap-program (string-append out "/bin/spicy")
195 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
196 #t)))))
197 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
198 (description "Gtk client and libraries for SPICE remote desktop servers.")
199 (home-page "https://www.spice-space.org")
200 (license (list license:lgpl2.1+ license:lgpl2.0+))))
201
202 (define-public spice
203 (package
204 (name "spice")
205 (version "0.14.2")
206 (source (origin
207 (method url-fetch)
208 (uri (string-append
209 "https://www.spice-space.org/download/releases/"
210 "spice-server/spice-" version ".tar.bz2"))
211 (sha256
212 (base32
213 "19r999py9v9c7md2bb8ysj809ag1hh6djl1ik8jcgx065s4b60xj"))))
214 (build-system gnu-build-system)
215 (propagated-inputs
216 `(("openssl" ,openssl)
217 ("pixman" ,pixman)
218 ("spice-protocol" ,spice-protocol)))
219 (inputs
220 `(("cyrus-sasl" ,cyrus-sasl)
221 ("glib" ,glib)
222 ("libjpeg-turbo" ,libjpeg-turbo)
223 ("lz4" ,lz4)
224 ("opus" ,opus)
225 ("orc" ,orc)
226 ("zlib" ,zlib)))
227 (native-inputs
228 `(("pkg-config" ,pkg-config)
229 ("python" ,python)
230 ("spice-gtk" ,spice-gtk)
231
232 ;; These are needed for the server listen tests.
233 ("glib-networking" ,glib-networking)
234 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
235 (arguments
236 `(#:configure-flags
237 '("--enable-lz4"
238 "--enable-automated-tests")
239
240 ;; Several tests appear to be opening the same sockets concurrently.
241 #:parallel-tests? #f))
242 (synopsis "Server implementation of the SPICE protocol")
243 (description "SPICE is a remote display system built for virtual
244 environments which allows you to view a computing @code{desktop} environment
245 not only on the machine where it is running, but from anywhere on the
246 Internet and from a wide variety of machine architectures.")
247 (home-page "https://www.spice-space.org")
248 (license (list license:lgpl2.1+ license:lgpl2.0+))))
249
250 (define-public spice-vdagent
251 (package
252 (name "spice-vdagent")
253 (version "0.17.0")
254 (source (origin
255 (method url-fetch)
256 (uri (string-append
257 "http://www.spice-space.org/download/releases/"
258 "spice-vdagent-" version ".tar.bz2"))
259 (sha256
260 (base32
261 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
262 (build-system gnu-build-system)
263 (arguments
264 `(#:configure-flags
265 '("--localstatedir=/var")
266 #:phases
267 (modify-phases %standard-phases
268 (add-after 'unpack 'patch-makefile.in
269 (lambda _
270 (substitute* "Makefile.in"
271 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
272 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
273 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
274 #t))
275 (add-after 'unpack 'patch-spice-vdagent.desktop
276 (lambda* (#:key outputs #:allow-other-keys)
277 (substitute* "data/spice-vdagent.desktop"
278 (("Exec=/usr/bin/spice-vdagent")
279 (string-append "Exec=" (assoc-ref outputs "out")
280 "/bin/spice-vdagent")))
281 #t)))))
282 (inputs
283 `(("alsa-lib" ,alsa-lib)
284 ("dbus" ,dbus)
285 ("glib" ,glib)
286 ("libpciaccess" ,libpciaccess)
287 ("libx11" ,libx11)
288 ("libxext" ,libxext)
289 ("libxfixes" ,libxfixes)
290 ("libxinerama" ,libxinerama)
291 ("libxrandr" ,libxrandr)
292 ("spice-protocol" ,spice-protocol)))
293 (native-inputs
294 `(("pkg-config" ,pkg-config)))
295 (synopsis "Spice agent for Linux")
296 (description "Spice-vdagent enables sharing the clipboard and guest display
297 resolution scaling on graphical console window resize.")
298 (home-page "https://www.spice-space.org")
299 (license license:gpl3+)))
300
301 (define-public virt-viewer
302 (package
303 (name "virt-viewer")
304 (version "7.0")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append
308 "https://virt-manager.org/download/sources/virt-viewer/"
309 "virt-viewer-" version ".tar.gz"))
310 (sha256
311 (base32
312 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
313 (build-system gnu-build-system)
314 (inputs
315 `(("gtk+" ,gtk+)
316 ("libcap" ,libcap)
317 ("libxml2" ,libxml2)
318 ("spice-gtk" ,spice-gtk)))
319 (native-inputs
320 `(("glib:bin" ,glib "bin")
321 ("intltool" ,intltool)
322 ("pkg-config" ,pkg-config)))
323 (arguments
324 `(#:configure-flags
325 '("--with-spice-gtk")
326 #:phases
327 (modify-phases %standard-phases
328 (add-after
329 'install 'wrap-remote-viewer
330 (lambda* (#:key inputs outputs #:allow-other-keys)
331 (let ((out (assoc-ref outputs "out"))
332 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
333 (wrap-program (string-append out "/bin/remote-viewer")
334 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
335 #t)))))
336 (synopsis "Graphical console client for virtual machines")
337 (description "Graphical console client for virtual machines using SPICE or
338 VNC.")
339 (home-page "https://virt-manager.org")
340 (license license:gpl2+)))