1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Craven <david@craven.ch>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages spice)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages autotools) ; remove after updating usbredir to 0.7.1+
22 #:use-module (gnu packages compression)
23 #:use-module (gnu packages cyrus-sasl)
24 #:use-module (gnu packages gl)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages gnome)
27 #:use-module (gnu packages gstreamer)
28 #:use-module (gnu packages gtk)
29 #:use-module (gnu packages image)
30 #:use-module (gnu packages libusb)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages pulseaudio)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages tls)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages xdisorg)
38 #:use-module (gnu packages xiph)
39 #:use-module (gnu packages xml)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix download)
42 #:use-module (guix git-download) ; remove after updating usbredir to 0.7.1+
43 #:use-module (guix packages)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils))
47 (define-public usbredir
48 (let ((commit "ac80a5971c6318d73d5fba4b5f13d3a9389558c9")
49 (revision "1")) ;Guix package revision
52 (version (string-append "0.7.1-" revision "."
53 (string-take commit 7)))
58 ; "http://spice-space.org/download/usbredir/"
59 ; "usbredir-" version ".tar.bz2"))
62 ; "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0"))))
63 ; FIXME: usbredir 0.7.1 release doesn't build on 32 bit systems.
64 ; issue is fixed in HEAD
65 ; remove 'autogen phase and autoconf, automake, libtool inputs
69 (url "https://anongit.freedesktop.org/git/spice/usbredir.git")
73 "052fywgi72j68dr5ybldncg4vk8iqfrh58la7iazyxxpph9aag1g"))))
74 (build-system gnu-build-system)
76 `(("libusb" ,libusb)))
78 `(("pkg-config" ,pkg-config)
79 ("autoconf" ,autoconf)
80 ("automake" ,automake)
81 ("libtool" ,libtool)))
84 (modify-phases %standard-phases
85 (add-after 'unpack 'autogen
87 (zero? (system* "autoreconf" "-vfi")))))))
88 (synopsis "Tools for sending USB device traffic over a network")
89 (description "Usbredir is a network protocol for sending USB device traffic
90 over a network connection. It can be used to redirect traffic from a USB device
91 to a different (virtual) machine than the one to which the USB device is
93 (home-page "https://www.spice-space.org")
94 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))))
96 (define-public virglrenderer
98 (name "virglrenderer")
103 "https://www.freedesktop.org/software/virgl/"
104 "virglrenderer-" version ".tar.bz2"))
105 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
108 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
109 (build-system gnu-build-system)
111 `(("libepoxy" ,libepoxy)
115 `(("pkg-config" ,pkg-config)))
116 (synopsis "Virtual 3D GPU library")
117 (description "A virtual 3D GPU library that enables a virtualized operating
118 system to use the host GPU to accelerate 3D rendering.")
119 (home-page "https://virgil3d.github.io")
120 (license (list license:expat license:bsd-3))))
122 (define-public spice-protocol
124 (name "spice-protocol")
129 "https://www.spice-space.org/download/releases/"
130 "spice-protocol-" version ".tar.bz2"))
133 "0cwrgkp558mblcf4vrhacb3iizz12khsrrl82w38w9nj0ar13vl9"))))
134 (build-system gnu-build-system)
135 (synopsis "Protocol headers for the SPICE protocol")
136 (description "SPICE (the Simple Protocol for Independent Computing
137 Environments) is a remote-display system built for virtual environments
138 which allows users to view a desktop computing environment.")
139 (home-page "https://www.spice-space.org")
140 (license (list license:bsd-3 license:lgpl2.1+))))
142 (define-public spice-gtk
149 "https://spice-space.org/download/gtk/"
150 "spice-gtk-" version ".tar.bz2"))
153 "0fdgx9k4vgmasp8i2n0swrkapq8f212igcg7wsgvr3mbhsvk7bvx"))))
154 (build-system gnu-build-system)
156 `(("gstreamer" ,gstreamer)
157 ("gst-libav" ,gst-libav)
158 ("gst-plugins-base" ,gst-plugins-base)
159 ("gst-plugins-good" ,gst-plugins-good)
160 ("gst-plugins-bad" ,gst-plugins-bad)
161 ("gst-plugins-ugly" ,gst-plugins-ugly)
162 ("spice-protocol" ,spice-protocol)))
164 `(("glib-networking" ,glib-networking)
165 ("gobject-introspection" ,gobject-introspection)
167 ("libepoxy" ,libepoxy)
173 ("pulseaudio" ,pulseaudio)
177 ("usbredir" ,usbredir)))
179 `(("glib:bin" ,glib "bin")
180 ("intltool" ,intltool)
181 ("pkg-config" ,pkg-config)))
184 '("--enable-gstaudio"
187 "--enable-introspection")
189 (modify-phases %standard-phases
192 (lambda* (#:key inputs outputs #:allow-other-keys)
193 (let ((out (assoc-ref outputs "out"))
194 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
195 (wrap-program (string-append out "/bin/spicy")
196 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
198 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
199 (description "Gtk client and libraries for SPICE remote desktop servers.")
200 (home-page "https://www.spice-space.org")
201 (license (list license:lgpl2.1+ license:lgpl2.0+))))
210 "http://www.spice-space.org/download/releases/"
211 "spice-" version ".tar.bz2"))
214 "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr"))
216 (search-patches "spice-CVE-2017-7506.patch"
217 "spice-CVE-2016-9577.patch"
218 "spice-CVE-2016-9578-1.patch"
219 "spice-CVE-2016-9578-2.patch"))))
220 (build-system gnu-build-system)
222 `(("openssl" ,openssl)
224 ("spice-protocol" ,spice-protocol)))
226 `(("cyrus-sasl" ,cyrus-sasl)
228 ("libjpeg-turbo" ,libjpeg-turbo)
233 `(("pkg-config" ,pkg-config)
235 ("spice-gtk" ,spice-gtk)))
238 '("--disable-celt051" ; Disable support for unpackaged audio codec
240 "--enable-automated-tests")))
241 (synopsis "Server implementation of the SPICE protocol")
242 (description "SPICE is a remote display system built for virtual
243 environments which allows you to view a computing 'desktop' environment
244 not only on the machine where it is running, but from anywhere on the
245 Internet and from a wide variety of machine architectures.")
246 (home-page "http://www.spice-space.org")
247 (license (list license:lgpl2.1+ license:lgpl2.0+))))
249 (define-public spice-vdagent
251 (name "spice-vdagent")
256 "http://www.spice-space.org/download/releases/"
257 "spice-vdagent-" version ".tar.bz2"))
260 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
261 (build-system gnu-build-system)
264 '("--localstatedir=/var")
266 (modify-phases %standard-phases
267 (add-after 'unpack 'patch-makefile.in
269 (substitute* "Makefile.in"
270 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
271 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
272 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
274 (add-after 'unpack 'patch-spice-vdagent.desktop
275 (lambda* (#:key outputs #:allow-other-keys)
276 (substitute* "data/spice-vdagent.desktop"
277 (("Exec=/usr/bin/spice-vdagent\n")
278 (string-append "Exec=" (assoc-ref outputs "out")
279 "/bin/spice-vdagent")))
282 `(("alsa-lib" ,alsa-lib)
285 ("libpciaccess" ,libpciaccess)
288 ("libxfixes" ,libxfixes)
289 ("libxinerama" ,libxinerama)
290 ("libxrandr" ,libxrandr)
291 ("spice-protocol" ,spice-protocol)))
293 `(("pkg-config" ,pkg-config)))
294 (synopsis "Spice agent for Linux")
295 (description "Spice-vdagent enables sharing the clipboard and guest display
296 resolution scaling on graphical console window resize.")
297 (home-page "http://www.spice-space.org")
298 (license license:gpl3+)))
300 (define-public virt-viewer
307 "https://virt-manager.org/download/sources/virt-viewer/"
308 "virt-viewer-" version ".tar.gz"))
311 "0blbp1wkw8ahss9va0bmcz2yx18j0mvm6fzrzhh2ly3sja5ysb8b"))))
312 (build-system gnu-build-system)
318 ("spice-gtk" ,spice-gtk)))
320 `(("glib:bin" ,glib "bin")
321 ("intltool" ,intltool)
322 ("pkg-config" ,pkg-config)))
325 '("--with-spice-gtk")
327 (modify-phases %standard-phases
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))))
336 (synopsis "Graphical console client for virtual machines")
337 (description "Graphical console client for virtual machines using SPICE or
339 (home-page "https://virt-manager.org")
340 (license license:gpl2+)))