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>
4 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages spice)
22 #:use-module (gnu packages)
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 packages)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils))
47 (define-public usbredir
50 (home-page "https://spice-space.org")
54 (uri (string-append home-page "/download/" name "/" name "-"
58 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
59 (build-system gnu-build-system)
61 `(("libusb" ,libusb)))
63 `(("pkg-config" ,pkg-config)))
64 (synopsis "Tools for sending USB device traffic over a network")
66 "Usbredir is a network protocol for sending USB device traffic over a
67 network connection. It can be used to redirect traffic from a USB device to a
68 different (virtual) machine than the one to which the USB device is attached.")
69 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
71 (define-public virglrenderer
73 (name "virglrenderer")
78 "https://www.freedesktop.org/software/virgl/"
79 "virglrenderer-" version ".tar.bz2"))
80 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
83 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
84 (build-system gnu-build-system)
86 `(("libepoxy" ,libepoxy)
90 `(("pkg-config" ,pkg-config)))
91 (synopsis "Virtual 3D GPU library")
92 (description "A virtual 3D GPU library that enables a virtualized operating
93 system to use the host GPU to accelerate 3D rendering.")
94 (home-page "https://virgil3d.github.io")
95 (license (list license:expat license:bsd-3))))
97 (define-public spice-protocol
99 (name "spice-protocol")
104 "https://www.spice-space.org/download/releases/"
105 "spice-protocol-" version ".tar.bz2"))
108 "06b461i4jv741in8617jjpfk28wk7zs9p7841njkf4sbm8xv4kcb"))))
109 (build-system gnu-build-system)
110 (synopsis "Protocol headers for the SPICE protocol")
111 (description "SPICE (the Simple Protocol for Independent Computing
112 Environments) is a remote-display system built for virtual environments
113 which allows users to view a desktop computing environment.")
114 (home-page "https://www.spice-space.org")
115 (license (list license:bsd-3 license:lgpl2.1+))))
117 (define-public spice-gtk
124 "https://spice-space.org/download/gtk/"
125 "spice-gtk-" version ".tar.bz2"))
128 "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml"))))
129 (build-system gnu-build-system)
131 `(("gstreamer" ,gstreamer)
132 ("gst-libav" ,gst-libav)
133 ("gst-plugins-base" ,gst-plugins-base)
134 ("gst-plugins-good" ,gst-plugins-good)
135 ("gst-plugins-bad" ,gst-plugins-bad)
136 ("gst-plugins-ugly" ,gst-plugins-ugly)
137 ("spice-protocol" ,spice-protocol)))
139 `(("glib-networking" ,glib-networking)
140 ("gobject-introspection" ,gobject-introspection)
142 ("libepoxy" ,libepoxy)
148 ("pulseaudio" ,pulseaudio)
152 ("usbredir" ,usbredir)))
154 `(("glib:bin" ,glib "bin")
155 ("intltool" ,intltool)
156 ("pkg-config" ,pkg-config)))
159 '("--enable-gstaudio"
162 "--enable-introspection")
164 (modify-phases %standard-phases
167 (lambda* (#:key inputs outputs #:allow-other-keys)
168 (let ((out (assoc-ref outputs "out"))
169 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
170 (wrap-program (string-append out "/bin/spicy")
171 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
173 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
174 (description "Gtk client and libraries for SPICE remote desktop servers.")
175 (home-page "https://www.spice-space.org")
176 (license (list license:lgpl2.1+ license:lgpl2.0+))))
185 "https://www.spice-space.org/download/releases/"
186 "spice-server/spice-" version ".tar.bz2"))
189 "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y"))))
190 (build-system gnu-build-system)
192 `(("openssl" ,openssl)
194 ("spice-protocol" ,spice-protocol)))
196 `(("cyrus-sasl" ,cyrus-sasl)
198 ("libjpeg-turbo" ,libjpeg-turbo)
204 `(("pkg-config" ,pkg-config)
206 ("spice-gtk" ,spice-gtk)
208 ;; These are needed for the server listen tests.
209 ("glib-networking" ,glib-networking)
210 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
214 "--enable-automated-tests")
216 ;; Several tests appear to be opening the same sockets concurrently.
217 #:parallel-tests? #f))
218 (synopsis "Server implementation of the SPICE protocol")
219 (description "SPICE is a remote display system built for virtual
220 environments which allows you to view a computing 'desktop' environment
221 not only on the machine where it is running, but from anywhere on the
222 Internet and from a wide variety of machine architectures.")
223 (home-page "https://www.spice-space.org")
224 (license (list license:lgpl2.1+ license:lgpl2.0+))))
226 (define-public spice-vdagent
228 (name "spice-vdagent")
233 "http://www.spice-space.org/download/releases/"
234 "spice-vdagent-" version ".tar.bz2"))
237 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
238 (build-system gnu-build-system)
241 '("--localstatedir=/var")
243 (modify-phases %standard-phases
244 (add-after 'unpack 'patch-makefile.in
246 (substitute* "Makefile.in"
247 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
248 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
249 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
251 (add-after 'unpack 'patch-spice-vdagent.desktop
252 (lambda* (#:key outputs #:allow-other-keys)
253 (substitute* "data/spice-vdagent.desktop"
254 (("Exec=/usr/bin/spice-vdagent")
255 (string-append "Exec=" (assoc-ref outputs "out")
256 "/bin/spice-vdagent")))
259 `(("alsa-lib" ,alsa-lib)
262 ("libpciaccess" ,libpciaccess)
265 ("libxfixes" ,libxfixes)
266 ("libxinerama" ,libxinerama)
267 ("libxrandr" ,libxrandr)
268 ("spice-protocol" ,spice-protocol)))
270 `(("pkg-config" ,pkg-config)))
271 (synopsis "Spice agent for Linux")
272 (description "Spice-vdagent enables sharing the clipboard and guest display
273 resolution scaling on graphical console window resize.")
274 (home-page "https://www.spice-space.org")
275 (license license:gpl3+)))
277 (define-public virt-viewer
284 "https://virt-manager.org/download/sources/virt-viewer/"
285 "virt-viewer-" version ".tar.gz"))
288 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
289 (build-system gnu-build-system)
295 ("spice-gtk" ,spice-gtk)))
297 `(("glib:bin" ,glib "bin")
298 ("intltool" ,intltool)
299 ("pkg-config" ,pkg-config)))
302 '("--with-spice-gtk")
304 (modify-phases %standard-phases
306 'install 'wrap-remote-viewer
307 (lambda* (#:key inputs outputs #:allow-other-keys)
308 (let ((out (assoc-ref outputs "out"))
309 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
310 (wrap-program (string-append out "/bin/remote-viewer")
311 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
313 (synopsis "Graphical console client for virtual machines")
314 (description "Graphical console client for virtual machines using SPICE or
316 (home-page "https://virt-manager.org")
317 (license license:gpl2+)))