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 "http://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"))
107 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
108 (build-system gnu-build-system)
110 `(("libepoxy" ,libepoxy)
114 `(("pkg-config" ,pkg-config)))
115 (synopsis "Virtual 3D GPU library")
116 (description "A virtual 3D GPU library that enables a virtualized operating
117 system to use the host GPU to accelerate 3D rendering.")
118 (home-page "https://virgil3d.github.io")
119 (license (list license:expat license:bsd-3))))
121 (define-public spice-protocol
123 (name "spice-protocol")
128 "https://www.spice-space.org/download/releases/"
129 "spice-protocol-" version ".tar.bz2"))
132 "00wx81f2ml62g3maw63jq9w217zym921rdi38h7lpm5m8ckxraqp"))))
133 (build-system gnu-build-system)
134 (synopsis "Protocol headers for the SPICE protocol")
135 (description "SPICE (the Simple Protocol for Independent Computing
136 Environments) is a remote-display system built for virtual environments
137 which allows users to view a desktop computing environment.")
138 (home-page "https://www.spice-space.org")
139 (license (list license:bsd-3 license:lgpl2.1+))))
141 (define-public spice-gtk
148 "https://spice-space.org/download/gtk/"
149 "spice-gtk-" version ".tar.bz2"))
152 "0fdgx9k4vgmasp8i2n0swrkapq8f212igcg7wsgvr3mbhsvk7bvx"))))
153 (build-system gnu-build-system)
155 `(("gstreamer" ,gstreamer)
156 ("gst-libav" ,gst-libav)
157 ("gst-plugins-base" ,gst-plugins-base)
158 ("gst-plugins-good" ,gst-plugins-good)
159 ("gst-plugins-bad" ,gst-plugins-bad)
160 ("gst-plugins-ugly" ,gst-plugins-ugly)
161 ("spice-protocol" ,spice-protocol)))
163 `(("glib-networking" ,glib-networking)
165 ("libepoxy" ,libepoxy)
171 ("pulseaudio" ,pulseaudio)
175 ("usbredir" ,usbredir)))
177 `(("glib:bin" ,glib "bin")
178 ("intltool" ,intltool)
179 ("pkg-config" ,pkg-config)))
182 '("--enable-gstaudio"
186 (modify-phases %standard-phases
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let ((out (assoc-ref outputs "out"))
191 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
192 (wrap-program (string-append out "/bin/spicy")
193 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
195 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
196 (description "Gtk client and libraries for SPICE remote desktop servers.")
197 (home-page "https://www.spice-space.org")
198 (license (list license:lgpl2.1+ license:lgpl2.0+))))
207 "http://www.spice-space.org/download/releases/"
208 "spice-" version ".tar.bz2"))
211 "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr"))
213 (search-patches "spice-CVE-2016-9577.patch"
214 "spice-CVE-2016-9578-1.patch"
215 "spice-CVE-2016-9578-2.patch"))))
216 (build-system gnu-build-system)
218 `(("openssl" ,openssl)
220 ("spice-protocol" ,spice-protocol)))
222 `(("cyrus-sasl" ,cyrus-sasl)
224 ("libjpeg-turbo" ,libjpeg-turbo)
229 `(("pkg-config" ,pkg-config)
231 ("spice-gtk" ,spice-gtk)))
234 '("--disable-celt051" ; Disable support for unpackaged audio codec
236 "--enable-automated-tests")))
237 (synopsis "Server implementation of the SPICE protocol")
238 (description "SPICE is a remote display system built for virtual
239 environments which allows you to view a computing 'desktop' environment
240 not only on the machine where it is running, but from anywhere on the
241 Internet and from a wide variety of machine architectures.")
242 (home-page "http://www.spice-space.org")
243 (license (list license:lgpl2.1+ license:lgpl2.0+))))
245 (define-public spice-vdagent
247 (name "spice-vdagent")
252 "http://www.spice-space.org/download/releases/"
253 "spice-vdagent-" version ".tar.bz2"))
256 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
257 (build-system gnu-build-system)
260 '("--localstatedir=/var")
262 (modify-phases %standard-phases
263 (add-after 'unpack 'patch-makefile.in
265 (substitute* "Makefile.in"
266 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
267 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
268 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
270 (add-after 'unpack 'patch-spice-vdagent.desktop
271 (lambda* (#:key outputs #:allow-other-keys)
272 (substitute* "data/spice-vdagent.desktop"
273 (("Exec=/usr/bin/spice-vdagent\n")
274 (string-append "Exec=" (assoc-ref outputs "out")
275 "/bin/spice-vdagent")))
278 `(("alsa-lib" ,alsa-lib)
281 ("libpciaccess" ,libpciaccess)
284 ("libxfixes" ,libxfixes)
285 ("libxinerama" ,libxinerama)
286 ("libxrandr" ,libxrandr)
287 ("spice-protocol" ,spice-protocol)))
289 `(("pkg-config" ,pkg-config)))
290 (synopsis "Spice agent for Linux")
291 (description "Spice-vdagent enables sharing the clipboard and guest display
292 resolution scaling on graphical console window resize.")
293 (home-page "http://www.spice-space.org")
294 (license license:gpl3+)))
296 (define-public virt-viewer
303 "https://virt-manager.org/download/sources/virt-viewer/"
304 "virt-viewer-" version ".tar.gz"))
307 "07zsi1fqg05mag1ayniaqj25fzb6dxg76d4ka5196lq4l477nhhw"))))
308 (build-system gnu-build-system)
314 ("spice-gtk" ,spice-gtk)))
316 `(("glib:bin" ,glib "bin")
317 ("intltool" ,intltool)
318 ("pkg-config" ,pkg-config)))
321 '("--with-spice-gtk")
323 (modify-phases %standard-phases
325 'install 'wrap-remote-viewer
326 (lambda* (#:key inputs outputs #:allow-other-keys)
327 (let ((out (assoc-ref outputs "out"))
328 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
329 (wrap-program (string-append out "/bin/remote-viewer")
330 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
332 (synopsis "Graphical console client for virtual machines")
333 (description "Graphical console client for virtual machines using SPICE or
335 (home-page "https://virt-manager.org")
336 (license license:gpl2+)))