gnu: syncthing: Update to 0.14.50.
[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>
1d2c67c1
DC
4;;;
5;;; This file is part of GNU Guix.
6;;;
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.
11;;;
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.
16;;;
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/>.
19
20(define-module (gnu packages spice)
21 #:use-module (gnu packages)
37d52f6e 22 #:use-module (gnu packages autotools) ; remove after updating usbredir to 0.7.1+
bb28cf90 23 #:use-module (gnu packages compression)
5f2a7f4f 24 #:use-module (gnu packages cyrus-sasl)
2ef2654d 25 #:use-module (gnu packages gl)
bb28cf90
DC
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)
1d2c67c1 31 #:use-module (gnu packages libusb)
2ef2654d 32 #:use-module (gnu packages linux)
1d2c67c1 33 #:use-module (gnu packages pkg-config)
bb28cf90
DC
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)
6144dff5 40 #:use-module (gnu packages xml)
1d2c67c1
DC
41 #:use-module (guix build-system gnu)
42 #:use-module (guix download)
37d52f6e 43 #:use-module (guix git-download) ; remove after updating usbredir to 0.7.1+
1d2c67c1
DC
44 #:use-module (guix packages)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils))
47
48(define-public usbredir
273f1c05
DC
49 (let ((commit "ac80a5971c6318d73d5fba4b5f13d3a9389558c9")
50 (revision "1")) ;Guix package revision
51 (package
52 (name "usbredir")
53 (version (string-append "0.7.1-" revision "."
54 (string-take commit 7)))
55 ;(version "0.7.1")
56 ;(source (origin
57 ; (method url-fetch)
58 ; (uri (string-append
59 ; "http://spice-space.org/download/usbredir/"
60 ; "usbredir-" version ".tar.bz2"))
61 ; (sha256
62 ; (base32
63 ; "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0"))))
64 ; FIXME: usbredir 0.7.1 release doesn't build on 32 bit systems.
65 ; issue is fixed in HEAD
66 ; remove 'autogen phase and autoconf, automake, libtool inputs
67 (source (origin
68 (method git-fetch)
69 (uri (git-reference
f578a412 70 (url "https://anongit.freedesktop.org/git/spice/usbredir.git")
273f1c05 71 (commit commit)))
96dcb8a0 72 (file-name (git-file-name name version))
273f1c05
DC
73 (sha256
74 (base32
75 "052fywgi72j68dr5ybldncg4vk8iqfrh58la7iazyxxpph9aag1g"))))
76 (build-system gnu-build-system)
77 (propagated-inputs
78 `(("libusb" ,libusb)))
79 (native-inputs
80 `(("pkg-config" ,pkg-config)
81 ("autoconf" ,autoconf)
82 ("automake" ,automake)
83 ("libtool" ,libtool)))
8cce8797
DC
84 (arguments
85 `(#:phases
86 (modify-phases %standard-phases
87 (add-after 'unpack 'autogen
88 (lambda _
07a049ce
LC
89 ;; Build without '-Werror', in particular to avoid errors due
90 ;; to the use of the deprecated 'libusb_set_debug' function.
91 (substitute* "configure.ac"
92 (("-Werror") ""))
8cce8797 93 (zero? (system* "autoreconf" "-vfi")))))))
273f1c05
DC
94 (synopsis "Tools for sending USB device traffic over a network")
95 (description "Usbredir is a network protocol for sending USB device traffic
96 over a network connection. It can be used to redirect traffic from a USB device
97 to a different (virtual) machine than the one to which the USB device is
98 attached.")
30156526 99 (home-page "https://www.spice-space.org")
273f1c05 100 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))))
2ef2654d
DC
101
102(define-public virglrenderer
103 (package
104 (name "virglrenderer")
8b20a4d1 105 (version "0.6.0")
2ef2654d
DC
106 (source (origin
107 (method url-fetch)
108 (uri (string-append
109 "https://www.freedesktop.org/software/virgl/"
110 "virglrenderer-" version ".tar.bz2"))
1e5b8bee 111 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
2ef2654d
DC
112 (sha256
113 (base32
8b20a4d1 114 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
2ef2654d
DC
115 (build-system gnu-build-system)
116 (inputs
117 `(("libepoxy" ,libepoxy)
118 ("mesa" ,mesa)
119 ("udev" ,eudev)))
120 (native-inputs
121 `(("pkg-config" ,pkg-config)))
122 (synopsis "Virtual 3D GPU library")
123 (description "A virtual 3D GPU library that enables a virtualized operating
124system to use the host GPU to accelerate 3D rendering.")
125 (home-page "https://virgil3d.github.io")
126 (license (list license:expat license:bsd-3))))
289e472f
DC
127
128(define-public spice-protocol
129 (package
130 (name "spice-protocol")
52d5b73f 131 (version "0.12.14")
289e472f
DC
132 (source (origin
133 (method url-fetch)
134 (uri (string-append
5e569d5c 135 "https://www.spice-space.org/download/releases/"
289e472f
DC
136 "spice-protocol-" version ".tar.bz2"))
137 (sha256
138 (base32
52d5b73f 139 "170ckpgazvqv7hxy209myg67pqnd6c0gvr4ysbqgsfch6320nd90"))))
289e472f
DC
140 (build-system gnu-build-system)
141 (synopsis "Protocol headers for the SPICE protocol")
142 (description "SPICE (the Simple Protocol for Independent Computing
143Environments) is a remote-display system built for virtual environments
144which allows users to view a desktop computing environment.")
5e569d5c 145 (home-page "https://www.spice-space.org")
289e472f 146 (license (list license:bsd-3 license:lgpl2.1+))))
bb28cf90
DC
147
148(define-public spice-gtk
149 (package
150 (name "spice-gtk")
206feae7 151 (version "0.35")
bb28cf90
DC
152 (source (origin
153 (method url-fetch)
154 (uri (string-append
f057755e 155 "https://spice-space.org/download/gtk/"
bb28cf90
DC
156 "spice-gtk-" version ".tar.bz2"))
157 (sha256
158 (base32
206feae7 159 "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml"))))
bb28cf90
DC
160 (build-system gnu-build-system)
161 (propagated-inputs
162 `(("gstreamer" ,gstreamer)
163 ("gst-libav" ,gst-libav)
164 ("gst-plugins-base" ,gst-plugins-base)
165 ("gst-plugins-good" ,gst-plugins-good)
166 ("gst-plugins-bad" ,gst-plugins-bad)
ba9e2ee6
LF
167 ("gst-plugins-ugly" ,gst-plugins-ugly)
168 ("spice-protocol" ,spice-protocol)))
bb28cf90
DC
169 (inputs
170 `(("glib-networking" ,glib-networking)
c44dd0d6 171 ("gobject-introspection" ,gobject-introspection)
bb28cf90
DC
172 ("gtk+" ,gtk+)
173 ("libepoxy" ,libepoxy)
174 ("libjpeg" ,libjpeg)
bb28cf90
DC
175 ("libxcb" ,libxcb)
176 ("lz4" ,lz4)
177 ("mesa" ,mesa)
178 ("pixman" ,pixman)
179 ("pulseaudio" ,pulseaudio)
180 ("python" ,python)
181 ("openssl" ,openssl)
182 ("opus" ,opus)
bb28cf90
DC
183 ("usbredir" ,usbredir)))
184 (native-inputs
185 `(("glib:bin" ,glib "bin")
186 ("intltool" ,intltool)
187 ("pkg-config" ,pkg-config)))
188 (arguments
189 `(#:configure-flags
190 '("--enable-gstaudio"
191 "--enable-gstvideo"
c44dd0d6
AP
192 "--enable-pulse"
193 "--enable-introspection")
bb28cf90
DC
194 #:phases
195 (modify-phases %standard-phases
196 (add-after
197 'install 'wrap-spicy
198 (lambda* (#:key inputs outputs #:allow-other-keys)
199 (let ((out (assoc-ref outputs "out"))
200 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
201 (wrap-program (string-append out "/bin/spicy")
202 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
203 #t)))))
204 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
205 (description "Gtk client and libraries for SPICE remote desktop servers.")
f057755e 206 (home-page "https://www.spice-space.org")
bb28cf90 207 (license (list license:lgpl2.1+ license:lgpl2.0+))))
3cbd37e4
DC
208
209(define-public spice
210 (package
211 (name "spice")
b142756d 212 (version "0.14.0")
3cbd37e4
DC
213 (source (origin
214 (method url-fetch)
215 (uri (string-append
b142756d 216 "https://www.spice-space.org/download/releases/"
3cbd37e4
DC
217 "spice-" version ".tar.bz2"))
218 (sha256
219 (base32
b142756d 220 "0j5q7cp5p95jk8fp48gz76rz96lifimdsx1wnpmfal0nnnar9nrs"))))
3cbd37e4
DC
221 (build-system gnu-build-system)
222 (propagated-inputs
223 `(("openssl" ,openssl)
224 ("pixman" ,pixman)
225 ("spice-protocol" ,spice-protocol)))
226 (inputs
5f2a7f4f
DC
227 `(("cyrus-sasl" ,cyrus-sasl)
228 ("glib" ,glib)
9b81876f 229 ("libjpeg-turbo" ,libjpeg-turbo)
3cbd37e4
DC
230 ("lz4" ,lz4)
231 ("opus" ,opus)
b142756d 232 ("orc" ,orc)
3cbd37e4
DC
233 ("zlib" ,zlib)))
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("python" ,python)
237 ("spice-gtk" ,spice-gtk)))
238 (arguments
239 `(#:configure-flags
240 '("--disable-celt051" ; Disable support for unpackaged audio codec
241 "--enable-lz4"
242 "--enable-automated-tests")))
243 (synopsis "Server implementation of the SPICE protocol")
244 (description "SPICE is a remote display system built for virtual
245environments which allows you to view a computing 'desktop' environment
246not only on the machine where it is running, but from anywhere on the
247Internet and from a wide variety of machine architectures.")
d5ae997a 248 (home-page "https://www.spice-space.org")
3cbd37e4 249 (license (list license:lgpl2.1+ license:lgpl2.0+))))
33b0f4a4
DC
250
251(define-public spice-vdagent
252 (package
253 (name "spice-vdagent")
254 (version "0.17.0")
255 (source (origin
256 (method url-fetch)
257 (uri (string-append
258 "http://www.spice-space.org/download/releases/"
259 "spice-vdagent-" version ".tar.bz2"))
260 (sha256
261 (base32
262 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
263 (build-system gnu-build-system)
264 (arguments
265 `(#:configure-flags
266 '("--localstatedir=/var")
267 #:phases
268 (modify-phases %standard-phases
269 (add-after 'unpack 'patch-makefile.in
270 (lambda _
271 (substitute* "Makefile.in"
272 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
273 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
274 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
e02cd2b8
DC
275 #t))
276 (add-after 'unpack 'patch-spice-vdagent.desktop
277 (lambda* (#:key outputs #:allow-other-keys)
278 (substitute* "data/spice-vdagent.desktop"
279 (("Exec=/usr/bin/spice-vdagent\n")
280 (string-append "Exec=" (assoc-ref outputs "out")
281 "/bin/spice-vdagent")))
33b0f4a4
DC
282 #t)))))
283 (inputs
284 `(("alsa-lib" ,alsa-lib)
285 ("dbus" ,dbus)
286 ("glib" ,glib)
287 ("libpciaccess" ,libpciaccess)
288 ("libx11" ,libx11)
289 ("libxext" ,libxext)
290 ("libxfixes" ,libxfixes)
291 ("libxinerama" ,libxinerama)
292 ("libxrandr" ,libxrandr)
293 ("spice-protocol" ,spice-protocol)))
294 (native-inputs
295 `(("pkg-config" ,pkg-config)))
296 (synopsis "Spice agent for Linux")
297 (description "Spice-vdagent enables sharing the clipboard and guest display
298resolution scaling on graphical console window resize.")
d5ae997a 299 (home-page "https://www.spice-space.org")
33b0f4a4 300 (license license:gpl3+)))
6144dff5
DC
301
302(define-public virt-viewer
303 (package
304 (name "virt-viewer")
800248fe 305 (version "7.0")
6144dff5
DC
306 (source (origin
307 (method url-fetch)
308 (uri (string-append
309 "https://virt-manager.org/download/sources/virt-viewer/"
310 "virt-viewer-" version ".tar.gz"))
311 (sha256
312 (base32
800248fe 313 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
6144dff5
DC
314 (build-system gnu-build-system)
315 (inputs
316 `(("gtk+" ,gtk+)
317 ("libcap" ,libcap)
318 ("libxml2" ,libxml2)
319 ("openssl" ,openssl)
f54510d2 320 ("spice-gtk" ,spice-gtk)))
6144dff5
DC
321 (native-inputs
322 `(("glib:bin" ,glib "bin")
323 ("intltool" ,intltool)
324 ("pkg-config" ,pkg-config)))
325 (arguments
326 `(#:configure-flags
327 '("--with-spice-gtk")
328 #:phases
329 (modify-phases %standard-phases
330 (add-after
331 'install 'wrap-remote-viewer
332 (lambda* (#:key inputs outputs #:allow-other-keys)
333 (let ((out (assoc-ref outputs "out"))
334 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
335 (wrap-program (string-append out "/bin/remote-viewer")
336 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
337 #t)))))
338 (synopsis "Graphical console client for virtual machines")
339 (description "Graphical console client for virtual machines using SPICE or
340VNC.")
341 (home-page "https://virt-manager.org")
342 (license license:gpl2+)))