gnu: python-cython: The i686 python2 workaround is needed for 32-bit ARM too.
[jackhill/guix/guix.git] / gnu / packages / spice.scm
CommitLineData
1d2c67c1
DC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 David Craven <david@craven.ch>
c0dc4179 3;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44ad1c16 4;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
a550da62 5;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
1d2c67c1
DC
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)
bb28cf90 24 #:use-module (gnu packages compression)
5f2a7f4f 25 #:use-module (gnu packages cyrus-sasl)
2ef2654d 26 #:use-module (gnu packages gl)
bb28cf90
DC
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)
1d2c67c1 32 #:use-module (gnu packages libusb)
2ef2654d 33 #:use-module (gnu packages linux)
1d2c67c1 34 #:use-module (gnu packages pkg-config)
bb28cf90
DC
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)
6144dff5 41 #:use-module (gnu packages xml)
1d2c67c1
DC
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
41a659d2
MB
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
68network connection. It can be used to redirect traffic from a USB device to a
69different (virtual) machine than the one to which the USB device is attached.")
70 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
2ef2654d
DC
71
72(define-public virglrenderer
73 (package
74 (name "virglrenderer")
8b20a4d1 75 (version "0.6.0")
2ef2654d
DC
76 (source (origin
77 (method url-fetch)
78 (uri (string-append
79 "https://www.freedesktop.org/software/virgl/"
80 "virglrenderer-" version ".tar.bz2"))
1e5b8bee 81 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
2ef2654d
DC
82 (sha256
83 (base32
8b20a4d1 84 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
2ef2654d
DC
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
94system to use the host GPU to accelerate 3D rendering.")
95 (home-page "https://virgil3d.github.io")
96 (license (list license:expat license:bsd-3))))
289e472f
DC
97
98(define-public spice-protocol
99 (package
100 (name "spice-protocol")
99e8ce52 101 (version "0.14.1")
289e472f
DC
102 (source (origin
103 (method url-fetch)
104 (uri (string-append
5e569d5c 105 "https://www.spice-space.org/download/releases/"
289e472f
DC
106 "spice-protocol-" version ".tar.bz2"))
107 (sha256
108 (base32
99e8ce52 109 "0ahk5hlanwhbc64r80xmchdav3ls156cvh9l68a0l22bhdhxmrkr"))))
289e472f
DC
110 (build-system gnu-build-system)
111 (synopsis "Protocol headers for the SPICE protocol")
112 (description "SPICE (the Simple Protocol for Independent Computing
113Environments) is a remote-display system built for virtual environments
114which allows users to view a desktop computing environment.")
5e569d5c 115 (home-page "https://www.spice-space.org")
289e472f 116 (license (list license:bsd-3 license:lgpl2.1+))))
bb28cf90
DC
117
118(define-public spice-gtk
119 (package
120 (name "spice-gtk")
4f20e0a2 121 (version "0.37")
bb28cf90
DC
122 (source (origin
123 (method url-fetch)
124 (uri (string-append
f057755e 125 "https://spice-space.org/download/gtk/"
bb28cf90
DC
126 "spice-gtk-" version ".tar.bz2"))
127 (sha256
128 (base32
4f20e0a2 129 "1drvj8y35gnxbnrxsipwi15yh0vs9ixzv4wslz6r3lra8w3bfa0z"))))
bb28cf90
DC
130 (build-system gnu-build-system)
131 (propagated-inputs
132 `(("gstreamer" ,gstreamer)
133 ("gst-libav" ,gst-libav)
134 ("gst-plugins-base" ,gst-plugins-base)
135 ("gst-plugins-good" ,gst-plugins-good)
136 ("gst-plugins-bad" ,gst-plugins-bad)
ba9e2ee6 137 ("gst-plugins-ugly" ,gst-plugins-ugly)
4f20e0a2 138 ("spice-protocol" ,spice-protocol)
a2d2c0bf
MB
139
140 ;; These are required by the pkg-config files.
141 ("gtk+" ,gtk+)
142 ("pixman" ,pixman)
143 ("openssl" ,openssl)))
bb28cf90
DC
144 (inputs
145 `(("glib-networking" ,glib-networking)
c44dd0d6 146 ("gobject-introspection" ,gobject-introspection)
fbd2a245 147 ("json-glib" ,json-glib)
bb28cf90 148 ("libepoxy" ,libepoxy)
4bd428a7 149 ("libjpeg" ,libjpeg-turbo)
bb28cf90
DC
150 ("libxcb" ,libxcb)
151 ("lz4" ,lz4)
152 ("mesa" ,mesa)
bb28cf90
DC
153 ("pulseaudio" ,pulseaudio)
154 ("python" ,python)
bb28cf90 155 ("opus" ,opus)
bb28cf90
DC
156 ("usbredir" ,usbredir)))
157 (native-inputs
158 `(("glib:bin" ,glib "bin")
159 ("intltool" ,intltool)
10e73bbc
EF
160 ("pkg-config" ,pkg-config)
161 ("vala" ,vala)))
bb28cf90
DC
162 (arguments
163 `(#:configure-flags
164 '("--enable-gstaudio"
165 "--enable-gstvideo"
c44dd0d6 166 "--enable-pulse"
10e73bbc 167 "--enable-vala"
c44dd0d6 168 "--enable-introspection")
bb28cf90
DC
169 #:phases
170 (modify-phases %standard-phases
fbd2a245
MB
171 (add-before 'check 'disable-session-test
172 (lambda _
173 ;; XXX: Disable session tests, because they require USB support,
174 ;; which is not available in the build container.
175 (substitute* "tests/Makefile"
176 (("test-session\\$\\(EXEEXT\\) ") ""))
177 #t))
bb28cf90
DC
178 (add-after
179 'install 'wrap-spicy
180 (lambda* (#:key inputs outputs #:allow-other-keys)
181 (let ((out (assoc-ref outputs "out"))
182 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
183 (wrap-program (string-append out "/bin/spicy")
184 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
185 #t)))))
186 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
187 (description "Gtk client and libraries for SPICE remote desktop servers.")
f057755e 188 (home-page "https://www.spice-space.org")
bb28cf90 189 (license (list license:lgpl2.1+ license:lgpl2.0+))))
3cbd37e4
DC
190
191(define-public spice
192 (package
193 (name "spice")
c0dc4179 194 (version "0.14.3")
3cbd37e4
DC
195 (source (origin
196 (method url-fetch)
197 (uri (string-append
b142756d 198 "https://www.spice-space.org/download/releases/"
f6b7ccc9 199 "spice-server/spice-" version ".tar.bz2"))
3cbd37e4
DC
200 (sha256
201 (base32
c0dc4179 202 "05512vkfayw18ypg4acqbbpr72nsnsz9bj7k8c2wyrvnl3j4n7am"))))
3cbd37e4
DC
203 (build-system gnu-build-system)
204 (propagated-inputs
205 `(("openssl" ,openssl)
206 ("pixman" ,pixman)
207 ("spice-protocol" ,spice-protocol)))
208 (inputs
5f2a7f4f
DC
209 `(("cyrus-sasl" ,cyrus-sasl)
210 ("glib" ,glib)
9b81876f 211 ("libjpeg-turbo" ,libjpeg-turbo)
3cbd37e4
DC
212 ("lz4" ,lz4)
213 ("opus" ,opus)
b142756d 214 ("orc" ,orc)
3cbd37e4
DC
215 ("zlib" ,zlib)))
216 (native-inputs
217 `(("pkg-config" ,pkg-config)
218 ("python" ,python)
f6b7ccc9
MB
219 ("spice-gtk" ,spice-gtk)
220
221 ;; These are needed for the server listen tests.
222 ("glib-networking" ,glib-networking)
223 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
3cbd37e4
DC
224 (arguments
225 `(#:configure-flags
f6b7ccc9
MB
226 '("--enable-lz4"
227 "--enable-automated-tests")
8504d192
LC
228
229 ;; Several tests appear to be opening the same sockets concurrently.
65211552 230 #:parallel-tests? #f))
3cbd37e4
DC
231 (synopsis "Server implementation of the SPICE protocol")
232 (description "SPICE is a remote display system built for virtual
36a4366d 233environments which allows you to view a computing @code{desktop} environment
3cbd37e4
DC
234not only on the machine where it is running, but from anywhere on the
235Internet and from a wide variety of machine architectures.")
d5ae997a 236 (home-page "https://www.spice-space.org")
3cbd37e4 237 (license (list license:lgpl2.1+ license:lgpl2.0+))))
33b0f4a4
DC
238
239(define-public spice-vdagent
240 (package
241 (name "spice-vdagent")
242 (version "0.17.0")
243 (source (origin
244 (method url-fetch)
245 (uri (string-append
246 "http://www.spice-space.org/download/releases/"
247 "spice-vdagent-" version ".tar.bz2"))
248 (sha256
249 (base32
250 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
251 (build-system gnu-build-system)
252 (arguments
253 `(#:configure-flags
254 '("--localstatedir=/var")
255 #:phases
256 (modify-phases %standard-phases
257 (add-after 'unpack 'patch-makefile.in
258 (lambda _
259 (substitute* "Makefile.in"
260 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
261 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
262 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
e02cd2b8
DC
263 #t))
264 (add-after 'unpack 'patch-spice-vdagent.desktop
265 (lambda* (#:key outputs #:allow-other-keys)
266 (substitute* "data/spice-vdagent.desktop"
3f995aaf 267 (("Exec=/usr/bin/spice-vdagent")
e02cd2b8
DC
268 (string-append "Exec=" (assoc-ref outputs "out")
269 "/bin/spice-vdagent")))
33b0f4a4
DC
270 #t)))))
271 (inputs
272 `(("alsa-lib" ,alsa-lib)
273 ("dbus" ,dbus)
274 ("glib" ,glib)
275 ("libpciaccess" ,libpciaccess)
276 ("libx11" ,libx11)
277 ("libxext" ,libxext)
278 ("libxfixes" ,libxfixes)
279 ("libxinerama" ,libxinerama)
280 ("libxrandr" ,libxrandr)
281 ("spice-protocol" ,spice-protocol)))
282 (native-inputs
283 `(("pkg-config" ,pkg-config)))
284 (synopsis "Spice agent for Linux")
285 (description "Spice-vdagent enables sharing the clipboard and guest display
286resolution scaling on graphical console window resize.")
d5ae997a 287 (home-page "https://www.spice-space.org")
33b0f4a4 288 (license license:gpl3+)))
6144dff5
DC
289
290(define-public virt-viewer
291 (package
292 (name "virt-viewer")
800248fe 293 (version "7.0")
6144dff5
DC
294 (source (origin
295 (method url-fetch)
296 (uri (string-append
297 "https://virt-manager.org/download/sources/virt-viewer/"
298 "virt-viewer-" version ".tar.gz"))
299 (sha256
300 (base32
800248fe 301 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
6144dff5
DC
302 (build-system gnu-build-system)
303 (inputs
304 `(("gtk+" ,gtk+)
305 ("libcap" ,libcap)
306 ("libxml2" ,libxml2)
f54510d2 307 ("spice-gtk" ,spice-gtk)))
6144dff5
DC
308 (native-inputs
309 `(("glib:bin" ,glib "bin")
310 ("intltool" ,intltool)
311 ("pkg-config" ,pkg-config)))
312 (arguments
313 `(#:configure-flags
314 '("--with-spice-gtk")
315 #:phases
316 (modify-phases %standard-phases
317 (add-after
318 'install 'wrap-remote-viewer
319 (lambda* (#:key inputs outputs #:allow-other-keys)
320 (let ((out (assoc-ref outputs "out"))
321 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
322 (wrap-program (string-append out "/bin/remote-viewer")
323 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
324 #t)))))
325 (synopsis "Graphical console client for virtual machines")
326 (description "Graphical console client for virtual machines using SPICE or
327VNC.")
328 (home-page "https://virt-manager.org")
329 (license license:gpl2+)))