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 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 packages)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix utils))
46 (define-public usbredir
49 (home-page "https://spice-space.org")
53 (uri (string-append home-page "/download/" name "/" name "-"
57 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
58 (build-system gnu-build-system)
60 `(("libusb" ,libusb)))
62 `(("pkg-config" ,pkg-config)))
63 (synopsis "Tools for sending USB device traffic over a network")
65 "Usbredir is a network protocol for sending USB device traffic over a
66 network connection. It can be used to redirect traffic from a USB device to a
67 different (virtual) machine than the one to which the USB device is attached.")
68 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
70 (define-public virglrenderer
72 (name "virglrenderer")
77 "https://www.freedesktop.org/software/virgl/"
78 "virglrenderer-" version ".tar.bz2"))
79 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
82 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
83 (build-system gnu-build-system)
85 `(("libepoxy" ,libepoxy)
89 `(("pkg-config" ,pkg-config)))
90 (synopsis "Virtual 3D GPU library")
91 (description "A virtual 3D GPU library that enables a virtualized operating
92 system to use the host GPU to accelerate 3D rendering.")
93 (home-page "https://virgil3d.github.io")
94 (license (list license:expat license:bsd-3))))
96 (define-public spice-protocol
98 (name "spice-protocol")
103 "https://www.spice-space.org/download/releases/"
104 "spice-protocol-" version ".tar.bz2"))
107 "170ckpgazvqv7hxy209myg67pqnd6c0gvr4ysbqgsfch6320nd90"))))
108 (build-system gnu-build-system)
109 (synopsis "Protocol headers for the SPICE protocol")
110 (description "SPICE (the Simple Protocol for Independent Computing
111 Environments) is a remote-display system built for virtual environments
112 which allows users to view a desktop computing environment.")
113 (home-page "https://www.spice-space.org")
114 (license (list license:bsd-3 license:lgpl2.1+))))
116 (define-public spice-gtk
123 "https://spice-space.org/download/gtk/"
124 "spice-gtk-" version ".tar.bz2"))
127 "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml"))))
128 (build-system gnu-build-system)
130 `(("gstreamer" ,gstreamer)
131 ("gst-libav" ,gst-libav)
132 ("gst-plugins-base" ,gst-plugins-base)
133 ("gst-plugins-good" ,gst-plugins-good)
134 ("gst-plugins-bad" ,gst-plugins-bad)
135 ("gst-plugins-ugly" ,gst-plugins-ugly)
136 ("spice-protocol" ,spice-protocol)))
138 `(("glib-networking" ,glib-networking)
139 ("gobject-introspection" ,gobject-introspection)
141 ("libepoxy" ,libepoxy)
147 ("pulseaudio" ,pulseaudio)
151 ("usbredir" ,usbredir)))
153 `(("glib:bin" ,glib "bin")
154 ("intltool" ,intltool)
155 ("pkg-config" ,pkg-config)))
158 '("--enable-gstaudio"
161 "--enable-introspection")
163 (modify-phases %standard-phases
166 (lambda* (#:key inputs outputs #:allow-other-keys)
167 (let ((out (assoc-ref outputs "out"))
168 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
169 (wrap-program (string-append out "/bin/spicy")
170 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
172 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
173 (description "Gtk client and libraries for SPICE remote desktop servers.")
174 (home-page "https://www.spice-space.org")
175 (license (list license:lgpl2.1+ license:lgpl2.0+))))
184 "https://www.spice-space.org/download/releases/"
185 "spice-server/spice-" version ".tar.bz2"))
188 "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y"))))
189 (build-system gnu-build-system)
191 `(("openssl" ,openssl)
193 ("spice-protocol" ,spice-protocol)))
195 `(("cyrus-sasl" ,cyrus-sasl)
197 ("libjpeg-turbo" ,libjpeg-turbo)
203 `(("pkg-config" ,pkg-config)
205 ("spice-gtk" ,spice-gtk)
207 ;; These are needed for the server listen tests.
208 ("glib-networking" ,glib-networking)
209 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
213 "--enable-automated-tests")
215 ;; Several tests appear to be opening the same sockets concurrently.
216 #:parallel-tests? #f))
217 (synopsis "Server implementation of the SPICE protocol")
218 (description "SPICE is a remote display system built for virtual
219 environments which allows you to view a computing 'desktop' environment
220 not only on the machine where it is running, but from anywhere on the
221 Internet and from a wide variety of machine architectures.")
222 (home-page "https://www.spice-space.org")
223 (license (list license:lgpl2.1+ license:lgpl2.0+))))
225 (define-public spice-vdagent
227 (name "spice-vdagent")
232 "http://www.spice-space.org/download/releases/"
233 "spice-vdagent-" version ".tar.bz2"))
236 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
237 (build-system gnu-build-system)
240 '("--localstatedir=/var")
242 (modify-phases %standard-phases
243 (add-after 'unpack 'patch-makefile.in
245 (substitute* "Makefile.in"
246 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
247 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
248 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
250 (add-after 'unpack 'patch-spice-vdagent.desktop
251 (lambda* (#:key outputs #:allow-other-keys)
252 (substitute* "data/spice-vdagent.desktop"
253 (("Exec=/usr/bin/spice-vdagent")
254 (string-append "Exec=" (assoc-ref outputs "out")
255 "/bin/spice-vdagent")))
258 `(("alsa-lib" ,alsa-lib)
261 ("libpciaccess" ,libpciaccess)
264 ("libxfixes" ,libxfixes)
265 ("libxinerama" ,libxinerama)
266 ("libxrandr" ,libxrandr)
267 ("spice-protocol" ,spice-protocol)))
269 `(("pkg-config" ,pkg-config)))
270 (synopsis "Spice agent for Linux")
271 (description "Spice-vdagent enables sharing the clipboard and guest display
272 resolution scaling on graphical console window resize.")
273 (home-page "https://www.spice-space.org")
274 (license license:gpl3+)))
276 (define-public virt-viewer
283 "https://virt-manager.org/download/sources/virt-viewer/"
284 "virt-viewer-" version ".tar.gz"))
287 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
288 (build-system gnu-build-system)
294 ("spice-gtk" ,spice-gtk)))
296 `(("glib:bin" ,glib "bin")
297 ("intltool" ,intltool)
298 ("pkg-config" ,pkg-config)))
301 '("--with-spice-gtk")
303 (modify-phases %standard-phases
305 'install 'wrap-remote-viewer
306 (lambda* (#:key inputs outputs #:allow-other-keys)
307 (let ((out (assoc-ref outputs "out"))
308 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
309 (wrap-program (string-append out "/bin/remote-viewer")
310 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
312 (synopsis "Graphical console client for virtual machines")
313 (description "Graphical console client for virtual machines using SPICE or
315 (home-page "https://virt-manager.org")
316 (license license:gpl2+)))