gnu: Add emacs-evil-ediff.
[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 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))
47
48 (define-public usbredir
49 (let ((commit "ac80a5971c6318d73d5fba4b5f13d3a9389558c9")
50 (revision "1")) ;Guix package revision
51 (package
52 (name "usbredir")
53 (version (string-append "0.7.1-" revision "."
54 (string-take commit 7)))
55 ;(version "0.7.1")
56 ;(source (origin
57 ; (method url-fetch)
58 ; (uri (string-append
59 ; "http://spice-space.org/download/usbredir/"
60 ; "usbredir-" version ".tar.bz2"))
61 ; (sha256
62 ; (base32
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
67 (source (origin
68 (method git-fetch)
69 (uri (git-reference
70 (url "https://anongit.freedesktop.org/git/spice/usbredir.git")
71 (commit commit)))
72 (file-name (git-file-name name version))
73 (sha256
74 (base32
75 "052fywgi72j68dr5ybldncg4vk8iqfrh58la7iazyxxpph9aag1g"))))
76 (build-system gnu-build-system)
77 (propagated-inputs
78 `(("libusb" ,libusb)))
79 (native-inputs
80 `(("pkg-config" ,pkg-config)
81 ("autoconf" ,autoconf)
82 ("automake" ,automake)
83 ("libtool" ,libtool)))
84 (arguments
85 `(#:phases
86 (modify-phases %standard-phases
87 (add-after 'unpack 'autogen
88 (lambda _
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"
92 (("-Werror") ""))
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
98 attached.")
99 (home-page "https://www.spice-space.org")
100 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))))
101
102 (define-public virglrenderer
103 (package
104 (name "virglrenderer")
105 (version "0.6.0")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append
109 "https://www.freedesktop.org/software/virgl/"
110 "virglrenderer-" version ".tar.bz2"))
111 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
112 (sha256
113 (base32
114 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
115 (build-system gnu-build-system)
116 (inputs
117 `(("libepoxy" ,libepoxy)
118 ("mesa" ,mesa)
119 ("udev" ,eudev)))
120 (native-inputs
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))))
127
128 (define-public spice-protocol
129 (package
130 (name "spice-protocol")
131 (version "0.12.13")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append
135 "https://www.spice-space.org/download/releases/"
136 "spice-protocol-" version ".tar.bz2"))
137 (sha256
138 (base32
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+))))
147
148 (define-public spice-gtk
149 (package
150 (name "spice-gtk")
151 (version "0.34")
152 (source (origin
153 (method url-fetch)
154 (uri (string-append
155 "https://spice-space.org/download/gtk/"
156 "spice-gtk-" version ".tar.bz2"))
157 (sha256
158 (base32
159 "1vknp72pl6v6nf3dphhwp29hk6gv787db2pmyg4m312z2q0hwwp9"))))
160 (build-system gnu-build-system)
161 (propagated-inputs
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)))
169 (inputs
170 `(("glib-networking" ,glib-networking)
171 ("gobject-introspection" ,gobject-introspection)
172 ("gtk+" ,gtk+)
173 ("libepoxy" ,libepoxy)
174 ("libjpeg" ,libjpeg)
175 ("libxcb" ,libxcb)
176 ("lz4" ,lz4)
177 ("mesa" ,mesa)
178 ("pixman" ,pixman)
179 ("pulseaudio" ,pulseaudio)
180 ("python" ,python)
181 ("openssl" ,openssl)
182 ("opus" ,opus)
183 ("usbredir" ,usbredir)))
184 (native-inputs
185 `(("glib:bin" ,glib "bin")
186 ("intltool" ,intltool)
187 ("pkg-config" ,pkg-config)))
188 (arguments
189 `(#:configure-flags
190 '("--enable-gstaudio"
191 "--enable-gstvideo"
192 "--enable-pulse"
193 "--enable-introspection")
194 #:phases
195 (modify-phases %standard-phases
196 (add-after
197 'install 'wrap-spicy
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))))
203 #t)))))
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+))))
208
209 (define-public spice
210 (package
211 (name "spice")
212 (version "0.14.0")
213 (source (origin
214 (method url-fetch)
215 (uri (string-append
216 "https://www.spice-space.org/download/releases/"
217 "spice-" version ".tar.bz2"))
218 (sha256
219 (base32
220 "0j5q7cp5p95jk8fp48gz76rz96lifimdsx1wnpmfal0nnnar9nrs"))))
221 (build-system gnu-build-system)
222 (propagated-inputs
223 `(("openssl" ,openssl)
224 ("pixman" ,pixman)
225 ("spice-protocol" ,spice-protocol)))
226 (inputs
227 `(("cyrus-sasl" ,cyrus-sasl)
228 ("glib" ,glib)
229 ("libjpeg-turbo" ,libjpeg-turbo)
230 ("lz4" ,lz4)
231 ("opus" ,opus)
232 ("orc" ,orc)
233 ("zlib" ,zlib)))
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("python" ,python)
237 ("spice-gtk" ,spice-gtk)))
238 (arguments
239 `(#:configure-flags
240 '("--disable-celt051" ; Disable support for unpackaged audio codec
241 "--enable-lz4"
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+))))
250
251 (define-public spice-vdagent
252 (package
253 (name "spice-vdagent")
254 (version "0.17.0")
255 (source (origin
256 (method url-fetch)
257 (uri (string-append
258 "http://www.spice-space.org/download/releases/"
259 "spice-vdagent-" version ".tar.bz2"))
260 (sha256
261 (base32
262 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
263 (build-system gnu-build-system)
264 (arguments
265 `(#:configure-flags
266 '("--localstatedir=/var")
267 #:phases
268 (modify-phases %standard-phases
269 (add-after 'unpack 'patch-makefile.in
270 (lambda _
271 (substitute* "Makefile.in"
272 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
273 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
274 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
275 #t))
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")))
282 #t)))))
283 (inputs
284 `(("alsa-lib" ,alsa-lib)
285 ("dbus" ,dbus)
286 ("glib" ,glib)
287 ("libpciaccess" ,libpciaccess)
288 ("libx11" ,libx11)
289 ("libxext" ,libxext)
290 ("libxfixes" ,libxfixes)
291 ("libxinerama" ,libxinerama)
292 ("libxrandr" ,libxrandr)
293 ("spice-protocol" ,spice-protocol)))
294 (native-inputs
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+)))
301
302 (define-public virt-viewer
303 (package
304 (name "virt-viewer")
305 (version "6.0")
306 (source (origin
307 (method url-fetch)
308 (uri (string-append
309 "https://virt-manager.org/download/sources/virt-viewer/"
310 "virt-viewer-" version ".tar.gz"))
311 (sha256
312 (base32
313 "1chqrf658niivzfh85cbwkbv9vyg8sv1mv3i31vawkfsfdvvsdwh"))))
314 (build-system gnu-build-system)
315 (inputs
316 `(("gtk+" ,gtk+)
317 ("libcap" ,libcap)
318 ("libxml2" ,libxml2)
319 ("openssl" ,openssl)
320 ("spice-gtk" ,spice-gtk)))
321 (native-inputs
322 `(("glib:bin" ,glib "bin")
323 ("intltool" ,intltool)
324 ("pkg-config" ,pkg-config)))
325 (arguments
326 `(#:configure-flags
327 '("--with-spice-gtk")
328 #:phases
329 (modify-phases %standard-phases
330 (add-after
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))))
337 #t)))))
338 (synopsis "Graphical console client for virtual machines")
339 (description "Graphical console client for virtual machines using SPICE or
340 VNC.")
341 (home-page "https://virt-manager.org")
342 (license license:gpl2+)))