gnu: glib-networking: Update to 2.58.0.
[jackhill/guix/guix.git] / gnu / packages / spice.scm
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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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))
45
46 (define-public usbredir
47 (package
48 (name "usbredir")
49 (home-page "https://spice-space.org")
50 (version "0.8.0")
51 (source (origin
52 (method url-fetch)
53 (uri (string-append home-page "/download/" name "/" name "-"
54 version ".tar.bz2"))
55 (sha256
56 (base32
57 "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47"))))
58 (build-system gnu-build-system)
59 (propagated-inputs
60 `(("libusb" ,libusb)))
61 (native-inputs
62 `(("pkg-config" ,pkg-config)))
63 (synopsis "Tools for sending USB device traffic over a network")
64 (description
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+))))
69
70 (define-public virglrenderer
71 (package
72 (name "virglrenderer")
73 (version "0.6.0")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append
77 "https://www.freedesktop.org/software/virgl/"
78 "virglrenderer-" version ".tar.bz2"))
79 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
80 (sha256
81 (base32
82 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
83 (build-system gnu-build-system)
84 (inputs
85 `(("libepoxy" ,libepoxy)
86 ("mesa" ,mesa)
87 ("udev" ,eudev)))
88 (native-inputs
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))))
95
96 (define-public spice-protocol
97 (package
98 (name "spice-protocol")
99 (version "0.12.14")
100 (source (origin
101 (method url-fetch)
102 (uri (string-append
103 "https://www.spice-space.org/download/releases/"
104 "spice-protocol-" version ".tar.bz2"))
105 (sha256
106 (base32
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+))))
115
116 (define-public spice-gtk
117 (package
118 (name "spice-gtk")
119 (version "0.35")
120 (source (origin
121 (method url-fetch)
122 (uri (string-append
123 "https://spice-space.org/download/gtk/"
124 "spice-gtk-" version ".tar.bz2"))
125 (sha256
126 (base32
127 "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml"))))
128 (build-system gnu-build-system)
129 (propagated-inputs
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)))
137 (inputs
138 `(("glib-networking" ,glib-networking)
139 ("gobject-introspection" ,gobject-introspection)
140 ("gtk+" ,gtk+)
141 ("libepoxy" ,libepoxy)
142 ("libjpeg" ,libjpeg)
143 ("libxcb" ,libxcb)
144 ("lz4" ,lz4)
145 ("mesa" ,mesa)
146 ("pixman" ,pixman)
147 ("pulseaudio" ,pulseaudio)
148 ("python" ,python)
149 ("openssl" ,openssl)
150 ("opus" ,opus)
151 ("usbredir" ,usbredir)))
152 (native-inputs
153 `(("glib:bin" ,glib "bin")
154 ("intltool" ,intltool)
155 ("pkg-config" ,pkg-config)))
156 (arguments
157 `(#:configure-flags
158 '("--enable-gstaudio"
159 "--enable-gstvideo"
160 "--enable-pulse"
161 "--enable-introspection")
162 #:phases
163 (modify-phases %standard-phases
164 (add-after
165 'install 'wrap-spicy
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))))
171 #t)))))
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+))))
176
177 (define-public spice
178 (package
179 (name "spice")
180 (version "0.14.1")
181 (source (origin
182 (method url-fetch)
183 (uri (string-append
184 "https://www.spice-space.org/download/releases/"
185 "spice-server/spice-" version ".tar.bz2"))
186 (sha256
187 (base32
188 "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y"))))
189 (build-system gnu-build-system)
190 (propagated-inputs
191 `(("openssl" ,openssl)
192 ("pixman" ,pixman)
193 ("spice-protocol" ,spice-protocol)))
194 (inputs
195 `(("cyrus-sasl" ,cyrus-sasl)
196 ("glib" ,glib)
197 ("libjpeg-turbo" ,libjpeg-turbo)
198 ("lz4" ,lz4)
199 ("opus" ,opus)
200 ("orc" ,orc)
201 ("zlib" ,zlib)))
202 (native-inputs
203 `(("pkg-config" ,pkg-config)
204 ("python" ,python)
205 ("spice-gtk" ,spice-gtk)
206
207 ;; These are needed for the server listen tests.
208 ("glib-networking" ,glib-networking)
209 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
210 (arguments
211 `(#:configure-flags
212 '("--enable-lz4"
213 "--enable-automated-tests")
214
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+))))
224
225 (define-public spice-vdagent
226 (package
227 (name "spice-vdagent")
228 (version "0.17.0")
229 (source (origin
230 (method url-fetch)
231 (uri (string-append
232 "http://www.spice-space.org/download/releases/"
233 "spice-vdagent-" version ".tar.bz2"))
234 (sha256
235 (base32
236 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
237 (build-system gnu-build-system)
238 (arguments
239 `(#:configure-flags
240 '("--localstatedir=/var")
241 #:phases
242 (modify-phases %standard-phases
243 (add-after 'unpack 'patch-makefile.in
244 (lambda _
245 (substitute* "Makefile.in"
246 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
247 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
248 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
249 #t))
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")))
256 #t)))))
257 (inputs
258 `(("alsa-lib" ,alsa-lib)
259 ("dbus" ,dbus)
260 ("glib" ,glib)
261 ("libpciaccess" ,libpciaccess)
262 ("libx11" ,libx11)
263 ("libxext" ,libxext)
264 ("libxfixes" ,libxfixes)
265 ("libxinerama" ,libxinerama)
266 ("libxrandr" ,libxrandr)
267 ("spice-protocol" ,spice-protocol)))
268 (native-inputs
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+)))
275
276 (define-public virt-viewer
277 (package
278 (name "virt-viewer")
279 (version "7.0")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append
283 "https://virt-manager.org/download/sources/virt-viewer/"
284 "virt-viewer-" version ".tar.gz"))
285 (sha256
286 (base32
287 "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7"))))
288 (build-system gnu-build-system)
289 (inputs
290 `(("gtk+" ,gtk+)
291 ("libcap" ,libcap)
292 ("libxml2" ,libxml2)
293 ("openssl" ,openssl)
294 ("spice-gtk" ,spice-gtk)))
295 (native-inputs
296 `(("glib:bin" ,glib "bin")
297 ("intltool" ,intltool)
298 ("pkg-config" ,pkg-config)))
299 (arguments
300 `(#:configure-flags
301 '("--with-spice-gtk")
302 #:phases
303 (modify-phases %standard-phases
304 (add-after
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))))
311 #t)))))
312 (synopsis "Graphical console client for virtual machines")
313 (description "Graphical console client for virtual machines using SPICE or
314 VNC.")
315 (home-page "https://virt-manager.org")
316 (license license:gpl2+)))