gnu: libvirt-glib: Propagate pkg-config requirements.
[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>
e564a16e 3;;; Copyright © 2018 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")
a550da62 101 (version "0.14.0")
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
a550da62 109 "1b3f44c13pqsp7aabmcinfbmgl79038bp5548l5pjs16lcfam95n"))))
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 117
a550da62
MB
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
bb28cf90
DC
131(define-public spice-gtk
132 (package
133 (name "spice-gtk")
fbd2a245 134 (version "0.36")
bb28cf90
DC
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
f057755e 138 "https://spice-space.org/download/gtk/"
bb28cf90
DC
139 "spice-gtk-" version ".tar.bz2"))
140 (sha256
141 (base32
fbd2a245 142 "1kfpixfdmxs9wn3id48gc9bvfrgxz935y3wpykf40bgi9mcc69ki"))))
bb28cf90
DC
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)
ba9e2ee6 150 ("gst-plugins-ugly" ,gst-plugins-ugly)
a550da62 151 ("spice-protocol" ,spice-protocol-0.12)
a2d2c0bf
MB
152
153 ;; These are required by the pkg-config files.
154 ("gtk+" ,gtk+)
155 ("pixman" ,pixman)
156 ("openssl" ,openssl)))
bb28cf90
DC
157 (inputs
158 `(("glib-networking" ,glib-networking)
c44dd0d6 159 ("gobject-introspection" ,gobject-introspection)
fbd2a245 160 ("json-glib" ,json-glib)
bb28cf90
DC
161 ("libepoxy" ,libepoxy)
162 ("libjpeg" ,libjpeg)
bb28cf90
DC
163 ("libxcb" ,libxcb)
164 ("lz4" ,lz4)
165 ("mesa" ,mesa)
bb28cf90
DC
166 ("pulseaudio" ,pulseaudio)
167 ("python" ,python)
bb28cf90 168 ("opus" ,opus)
bb28cf90
DC
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"
c44dd0d6
AP
178 "--enable-pulse"
179 "--enable-introspection")
bb28cf90
DC
180 #:phases
181 (modify-phases %standard-phases
fbd2a245
MB
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))
bb28cf90
DC
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.")
f057755e 199 (home-page "https://www.spice-space.org")
bb28cf90 200 (license (list license:lgpl2.1+ license:lgpl2.0+))))
3cbd37e4
DC
201
202(define-public spice
203 (package
204 (name "spice")
a0d44bb0 205 (version "0.14.2")
3cbd37e4
DC
206 (source (origin
207 (method url-fetch)
208 (uri (string-append
b142756d 209 "https://www.spice-space.org/download/releases/"
f6b7ccc9 210 "spice-server/spice-" version ".tar.bz2"))
3cbd37e4
DC
211 (sha256
212 (base32
a0d44bb0 213 "19r999py9v9c7md2bb8ysj809ag1hh6djl1ik8jcgx065s4b60xj"))))
3cbd37e4
DC
214 (build-system gnu-build-system)
215 (propagated-inputs
216 `(("openssl" ,openssl)
217 ("pixman" ,pixman)
218 ("spice-protocol" ,spice-protocol)))
219 (inputs
5f2a7f4f
DC
220 `(("cyrus-sasl" ,cyrus-sasl)
221 ("glib" ,glib)
9b81876f 222 ("libjpeg-turbo" ,libjpeg-turbo)
3cbd37e4
DC
223 ("lz4" ,lz4)
224 ("opus" ,opus)
b142756d 225 ("orc" ,orc)
3cbd37e4
DC
226 ("zlib" ,zlib)))
227 (native-inputs
228 `(("pkg-config" ,pkg-config)
229 ("python" ,python)
f6b7ccc9
MB
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)))
3cbd37e4
DC
235 (arguments
236 `(#:configure-flags
f6b7ccc9
MB
237 '("--enable-lz4"
238 "--enable-automated-tests")
8504d192
LC
239
240 ;; Several tests appear to be opening the same sockets concurrently.
65211552 241 #:parallel-tests? #f))
3cbd37e4
DC
242 (synopsis "Server implementation of the SPICE protocol")
243 (description "SPICE is a remote display system built for virtual
36a4366d 244environments which allows you to view a computing @code{desktop} environment
3cbd37e4
DC
245not only on the machine where it is running, but from anywhere on the
246Internet and from a wide variety of machine architectures.")
d5ae997a 247 (home-page "https://www.spice-space.org")
3cbd37e4 248 (license (list license:lgpl2.1+ license:lgpl2.0+))))
33b0f4a4
DC
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"))
e02cd2b8
DC
274 #t))
275 (add-after 'unpack 'patch-spice-vdagent.desktop
276 (lambda* (#:key outputs #:allow-other-keys)
277 (substitute* "data/spice-vdagent.desktop"
3f995aaf 278 (("Exec=/usr/bin/spice-vdagent")
e02cd2b8
DC
279 (string-append "Exec=" (assoc-ref outputs "out")
280 "/bin/spice-vdagent")))
33b0f4a4
DC
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
297resolution scaling on graphical console window resize.")
d5ae997a 298 (home-page "https://www.spice-space.org")
33b0f4a4 299 (license license:gpl3+)))
6144dff5
DC
300
301(define-public virt-viewer
302 (package
303 (name "virt-viewer")
800248fe 304 (version "7.0")
6144dff5
DC
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
800248fe 312 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
6144dff5
DC
313 (build-system gnu-build-system)
314 (inputs
315 `(("gtk+" ,gtk+)
316 ("libcap" ,libcap)
317 ("libxml2" ,libxml2)
f54510d2 318 ("spice-gtk" ,spice-gtk)))
6144dff5
DC
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
338VNC.")
339 (home-page "https://virt-manager.org")
340 (license license:gpl2+)))