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