1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Craven <david@craven.ch>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages spice)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages autotools) ; remove after updating usbredir to 0.7.1+
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages cyrus-sasl)
25 #:use-module (gnu packages gl)
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)
31 #:use-module (gnu packages libusb)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages pkg-config)
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)
40 #:use-module (gnu packages xml)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix download)
43 #:use-module (guix git-download) ; remove after updating usbredir to 0.7.1+
44 #:use-module (guix packages)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix utils))
48 (define-public usbredir
49 (let ((commit "ac80a5971c6318d73d5fba4b5f13d3a9389558c9")
50 (revision "1")) ;Guix package revision
53 (version (string-append "0.7.1-" revision "."
54 (string-take commit 7)))
59 ; "http://spice-space.org/download/usbredir/"
60 ; "usbredir-" version ".tar.bz2"))
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
70 (url "https://anongit.freedesktop.org/git/spice/usbredir.git")
72 (file-name (git-file-name name version))
75 "052fywgi72j68dr5ybldncg4vk8iqfrh58la7iazyxxpph9aag1g"))))
76 (build-system gnu-build-system)
78 `(("libusb" ,libusb)))
80 `(("pkg-config" ,pkg-config)
81 ("autoconf" ,autoconf)
82 ("automake" ,automake)
83 ("libtool" ,libtool)))
86 (modify-phases %standard-phases
87 (add-after 'unpack 'autogen
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"
93 (zero? (system* "autoreconf" "-vfi")))))))
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
99 (home-page "https://www.spice-space.org")
100 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))))
102 (define-public virglrenderer
104 (name "virglrenderer")
109 "https://www.freedesktop.org/software/virgl/"
110 "virglrenderer-" version ".tar.bz2"))
111 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
114 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
115 (build-system gnu-build-system)
117 `(("libepoxy" ,libepoxy)
121 `(("pkg-config" ,pkg-config)))
122 (synopsis "Virtual 3D GPU library")
123 (description "A virtual 3D GPU library that enables a virtualized operating
124 system to use the host GPU to accelerate 3D rendering.")
125 (home-page "https://virgil3d.github.io")
126 (license (list license:expat license:bsd-3))))
128 (define-public spice-protocol
130 (name "spice-protocol")
135 "https://www.spice-space.org/download/releases/"
136 "spice-protocol-" version ".tar.bz2"))
139 "0cwrgkp558mblcf4vrhacb3iizz12khsrrl82w38w9nj0ar13vl9"))))
140 (build-system gnu-build-system)
141 (synopsis "Protocol headers for the SPICE protocol")
142 (description "SPICE (the Simple Protocol for Independent Computing
143 Environments) is a remote-display system built for virtual environments
144 which allows users to view a desktop computing environment.")
145 (home-page "https://www.spice-space.org")
146 (license (list license:bsd-3 license:lgpl2.1+))))
148 (define-public spice-gtk
155 "https://spice-space.org/download/gtk/"
156 "spice-gtk-" version ".tar.bz2"))
159 "1vknp72pl6v6nf3dphhwp29hk6gv787db2pmyg4m312z2q0hwwp9"))))
160 (build-system gnu-build-system)
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)
167 ("gst-plugins-ugly" ,gst-plugins-ugly)
168 ("spice-protocol" ,spice-protocol)))
170 `(("glib-networking" ,glib-networking)
171 ("gobject-introspection" ,gobject-introspection)
173 ("libepoxy" ,libepoxy)
179 ("pulseaudio" ,pulseaudio)
183 ("usbredir" ,usbredir)))
185 `(("glib:bin" ,glib "bin")
186 ("intltool" ,intltool)
187 ("pkg-config" ,pkg-config)))
190 '("--enable-gstaudio"
193 "--enable-introspection")
195 (modify-phases %standard-phases
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))))
204 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
205 (description "Gtk client and libraries for SPICE remote desktop servers.")
206 (home-page "https://www.spice-space.org")
207 (license (list license:lgpl2.1+ license:lgpl2.0+))))
216 "https://www.spice-space.org/download/releases/"
217 "spice-" version ".tar.bz2"))
220 "0j5q7cp5p95jk8fp48gz76rz96lifimdsx1wnpmfal0nnnar9nrs"))))
221 (build-system gnu-build-system)
223 `(("openssl" ,openssl)
225 ("spice-protocol" ,spice-protocol)))
227 `(("cyrus-sasl" ,cyrus-sasl)
229 ("libjpeg-turbo" ,libjpeg-turbo)
235 `(("pkg-config" ,pkg-config)
237 ("spice-gtk" ,spice-gtk)))
240 '("--disable-celt051" ; Disable support for unpackaged audio codec
242 "--enable-automated-tests")))
243 (synopsis "Server implementation of the SPICE protocol")
244 (description "SPICE is a remote display system built for virtual
245 environments which allows you to view a computing 'desktop' environment
246 not only on the machine where it is running, but from anywhere on the
247 Internet and from a wide variety of machine architectures.")
248 (home-page "https://www.spice-space.org")
249 (license (list license:lgpl2.1+ license:lgpl2.0+))))
251 (define-public spice-vdagent
253 (name "spice-vdagent")
258 "http://www.spice-space.org/download/releases/"
259 "spice-vdagent-" version ".tar.bz2"))
262 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
263 (build-system gnu-build-system)
266 '("--localstatedir=/var")
268 (modify-phases %standard-phases
269 (add-after 'unpack 'patch-makefile.in
271 (substitute* "Makefile.in"
272 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
273 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
274 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
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")))
284 `(("alsa-lib" ,alsa-lib)
287 ("libpciaccess" ,libpciaccess)
290 ("libxfixes" ,libxfixes)
291 ("libxinerama" ,libxinerama)
292 ("libxrandr" ,libxrandr)
293 ("spice-protocol" ,spice-protocol)))
295 `(("pkg-config" ,pkg-config)))
296 (synopsis "Spice agent for Linux")
297 (description "Spice-vdagent enables sharing the clipboard and guest display
298 resolution scaling on graphical console window resize.")
299 (home-page "https://www.spice-space.org")
300 (license license:gpl3+)))
302 (define-public virt-viewer
309 "https://virt-manager.org/download/sources/virt-viewer/"
310 "virt-viewer-" version ".tar.gz"))
313 "1chqrf658niivzfh85cbwkbv9vyg8sv1mv3i31vawkfsfdvvsdwh"))))
314 (build-system gnu-build-system)
320 ("spice-gtk" ,spice-gtk)))
322 `(("glib:bin" ,glib "bin")
323 ("intltool" ,intltool)
324 ("pkg-config" ,pkg-config)))
327 '("--with-spice-gtk")
329 (modify-phases %standard-phases
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))))
338 (synopsis "Graphical console client for virtual machines")
339 (description "Graphical console client for virtual machines using SPICE or
341 (home-page "https://virt-manager.org")
342 (license license:gpl2+)))