gnu: go-github-com-gogo-protobuf: Update to 0.5-1.35b81a0.
[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 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages spice)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages autotools) ; remove after updating usbredir to 0.7.1+
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 git-download) ; remove after updating usbredir to 0.7.1+
43 #:use-module (guix packages)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils))
46
47 (define-public usbredir
48 (let ((commit "ac80a5971c6318d73d5fba4b5f13d3a9389558c9")
49 (revision "1")) ;Guix package revision
50 (package
51 (name "usbredir")
52 (version (string-append "0.7.1-" revision "."
53 (string-take commit 7)))
54 ;(version "0.7.1")
55 ;(source (origin
56 ; (method url-fetch)
57 ; (uri (string-append
58 ; "http://spice-space.org/download/usbredir/"
59 ; "usbredir-" version ".tar.bz2"))
60 ; (sha256
61 ; (base32
62 ; "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0"))))
63 ; FIXME: usbredir 0.7.1 release doesn't build on 32 bit systems.
64 ; issue is fixed in HEAD
65 ; remove 'autogen phase and autoconf, automake, libtool inputs
66 (source (origin
67 (method git-fetch)
68 (uri (git-reference
69 (url "https://anongit.freedesktop.org/git/spice/usbredir.git")
70 (commit commit)))
71 (sha256
72 (base32
73 "052fywgi72j68dr5ybldncg4vk8iqfrh58la7iazyxxpph9aag1g"))))
74 (build-system gnu-build-system)
75 (propagated-inputs
76 `(("libusb" ,libusb)))
77 (native-inputs
78 `(("pkg-config" ,pkg-config)
79 ("autoconf" ,autoconf)
80 ("automake" ,automake)
81 ("libtool" ,libtool)))
82 (arguments
83 `(#:phases
84 (modify-phases %standard-phases
85 (add-after 'unpack 'autogen
86 (lambda _
87 (zero? (system* "autoreconf" "-vfi")))))))
88 (synopsis "Tools for sending USB device traffic over a network")
89 (description "Usbredir is a network protocol for sending USB device traffic
90 over a network connection. It can be used to redirect traffic from a USB device
91 to a different (virtual) machine than the one to which the USB device is
92 attached.")
93 (home-page "https://www.spice-space.org")
94 (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))))
95
96 (define-public virglrenderer
97 (package
98 (name "virglrenderer")
99 (version "0.6.0")
100 (source (origin
101 (method url-fetch)
102 (uri (string-append
103 "https://www.freedesktop.org/software/virgl/"
104 "virglrenderer-" version ".tar.bz2"))
105 (patches (search-patches "virglrenderer-CVE-2017-6386.patch"))
106 (sha256
107 (base32
108 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
109 (build-system gnu-build-system)
110 (inputs
111 `(("libepoxy" ,libepoxy)
112 ("mesa" ,mesa)
113 ("udev" ,eudev)))
114 (native-inputs
115 `(("pkg-config" ,pkg-config)))
116 (synopsis "Virtual 3D GPU library")
117 (description "A virtual 3D GPU library that enables a virtualized operating
118 system to use the host GPU to accelerate 3D rendering.")
119 (home-page "https://virgil3d.github.io")
120 (license (list license:expat license:bsd-3))))
121
122 (define-public spice-protocol
123 (package
124 (name "spice-protocol")
125 (version "0.12.13")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append
129 "https://www.spice-space.org/download/releases/"
130 "spice-protocol-" version ".tar.bz2"))
131 (sha256
132 (base32
133 "0cwrgkp558mblcf4vrhacb3iizz12khsrrl82w38w9nj0ar13vl9"))))
134 (build-system gnu-build-system)
135 (synopsis "Protocol headers for the SPICE protocol")
136 (description "SPICE (the Simple Protocol for Independent Computing
137 Environments) is a remote-display system built for virtual environments
138 which allows users to view a desktop computing environment.")
139 (home-page "https://www.spice-space.org")
140 (license (list license:bsd-3 license:lgpl2.1+))))
141
142 (define-public spice-gtk
143 (package
144 (name "spice-gtk")
145 (version "0.33")
146 (source (origin
147 (method url-fetch)
148 (uri (string-append
149 "https://spice-space.org/download/gtk/"
150 "spice-gtk-" version ".tar.bz2"))
151 (sha256
152 (base32
153 "0fdgx9k4vgmasp8i2n0swrkapq8f212igcg7wsgvr3mbhsvk7bvx"))))
154 (build-system gnu-build-system)
155 (propagated-inputs
156 `(("gstreamer" ,gstreamer)
157 ("gst-libav" ,gst-libav)
158 ("gst-plugins-base" ,gst-plugins-base)
159 ("gst-plugins-good" ,gst-plugins-good)
160 ("gst-plugins-bad" ,gst-plugins-bad)
161 ("gst-plugins-ugly" ,gst-plugins-ugly)
162 ("spice-protocol" ,spice-protocol)))
163 (inputs
164 `(("glib-networking" ,glib-networking)
165 ("gobject-introspection" ,gobject-introspection)
166 ("gtk+" ,gtk+)
167 ("libepoxy" ,libepoxy)
168 ("libjpeg" ,libjpeg)
169 ("libxcb" ,libxcb)
170 ("lz4" ,lz4)
171 ("mesa" ,mesa)
172 ("pixman" ,pixman)
173 ("pulseaudio" ,pulseaudio)
174 ("python" ,python)
175 ("openssl" ,openssl)
176 ("opus" ,opus)
177 ("usbredir" ,usbredir)))
178 (native-inputs
179 `(("glib:bin" ,glib "bin")
180 ("intltool" ,intltool)
181 ("pkg-config" ,pkg-config)))
182 (arguments
183 `(#:configure-flags
184 '("--enable-gstaudio"
185 "--enable-gstvideo"
186 "--enable-pulse"
187 "--enable-introspection")
188 #:phases
189 (modify-phases %standard-phases
190 (add-after
191 'install 'wrap-spicy
192 (lambda* (#:key inputs outputs #:allow-other-keys)
193 (let ((out (assoc-ref outputs "out"))
194 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
195 (wrap-program (string-append out "/bin/spicy")
196 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
197 #t)))))
198 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
199 (description "Gtk client and libraries for SPICE remote desktop servers.")
200 (home-page "https://www.spice-space.org")
201 (license (list license:lgpl2.1+ license:lgpl2.0+))))
202
203 (define-public spice
204 (package
205 (name "spice")
206 (version "0.14.0")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append
210 "https://www.spice-space.org/download/releases/"
211 "spice-" version ".tar.bz2"))
212 (sha256
213 (base32
214 "0j5q7cp5p95jk8fp48gz76rz96lifimdsx1wnpmfal0nnnar9nrs"))))
215 (build-system gnu-build-system)
216 (propagated-inputs
217 `(("openssl" ,openssl)
218 ("pixman" ,pixman)
219 ("spice-protocol" ,spice-protocol)))
220 (inputs
221 `(("cyrus-sasl" ,cyrus-sasl)
222 ("glib" ,glib)
223 ("libjpeg-turbo" ,libjpeg-turbo)
224 ("lz4" ,lz4)
225 ("opus" ,opus)
226 ("orc" ,orc)
227 ("zlib" ,zlib)))
228 (native-inputs
229 `(("pkg-config" ,pkg-config)
230 ("python" ,python)
231 ("spice-gtk" ,spice-gtk)))
232 (arguments
233 `(#:configure-flags
234 '("--disable-celt051" ; Disable support for unpackaged audio codec
235 "--enable-lz4"
236 "--enable-automated-tests")))
237 (synopsis "Server implementation of the SPICE protocol")
238 (description "SPICE is a remote display system built for virtual
239 environments which allows you to view a computing 'desktop' environment
240 not only on the machine where it is running, but from anywhere on the
241 Internet and from a wide variety of machine architectures.")
242 (home-page "http://www.spice-space.org")
243 (license (list license:lgpl2.1+ license:lgpl2.0+))))
244
245 (define-public spice-vdagent
246 (package
247 (name "spice-vdagent")
248 (version "0.17.0")
249 (source (origin
250 (method url-fetch)
251 (uri (string-append
252 "http://www.spice-space.org/download/releases/"
253 "spice-vdagent-" version ".tar.bz2"))
254 (sha256
255 (base32
256 "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi"))))
257 (build-system gnu-build-system)
258 (arguments
259 `(#:configure-flags
260 '("--localstatedir=/var")
261 #:phases
262 (modify-phases %standard-phases
263 (add-after 'unpack 'patch-makefile.in
264 (lambda _
265 (substitute* "Makefile.in"
266 (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)"
267 "\\$\\(localstatedir\\)/run/spice-vdagentd"))
268 "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd"))
269 #t))
270 (add-after 'unpack 'patch-spice-vdagent.desktop
271 (lambda* (#:key outputs #:allow-other-keys)
272 (substitute* "data/spice-vdagent.desktop"
273 (("Exec=/usr/bin/spice-vdagent\n")
274 (string-append "Exec=" (assoc-ref outputs "out")
275 "/bin/spice-vdagent")))
276 #t)))))
277 (inputs
278 `(("alsa-lib" ,alsa-lib)
279 ("dbus" ,dbus)
280 ("glib" ,glib)
281 ("libpciaccess" ,libpciaccess)
282 ("libx11" ,libx11)
283 ("libxext" ,libxext)
284 ("libxfixes" ,libxfixes)
285 ("libxinerama" ,libxinerama)
286 ("libxrandr" ,libxrandr)
287 ("spice-protocol" ,spice-protocol)))
288 (native-inputs
289 `(("pkg-config" ,pkg-config)))
290 (synopsis "Spice agent for Linux")
291 (description "Spice-vdagent enables sharing the clipboard and guest display
292 resolution scaling on graphical console window resize.")
293 (home-page "http://www.spice-space.org")
294 (license license:gpl3+)))
295
296 (define-public virt-viewer
297 (package
298 (name "virt-viewer")
299 (version "5.0")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append
303 "https://virt-manager.org/download/sources/virt-viewer/"
304 "virt-viewer-" version ".tar.gz"))
305 (sha256
306 (base32
307 "0blbp1wkw8ahss9va0bmcz2yx18j0mvm6fzrzhh2ly3sja5ysb8b"))))
308 (build-system gnu-build-system)
309 (inputs
310 `(("gtk+" ,gtk+)
311 ("libcap" ,libcap)
312 ("libxml2" ,libxml2)
313 ("openssl" ,openssl)
314 ("spice-gtk" ,spice-gtk)))
315 (native-inputs
316 `(("glib:bin" ,glib "bin")
317 ("intltool" ,intltool)
318 ("pkg-config" ,pkg-config)))
319 (arguments
320 `(#:configure-flags
321 '("--with-spice-gtk")
322 #:phases
323 (modify-phases %standard-phases
324 (add-after
325 'install 'wrap-remote-viewer
326 (lambda* (#:key inputs outputs #:allow-other-keys)
327 (let ((out (assoc-ref outputs "out"))
328 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
329 (wrap-program (string-append out "/bin/remote-viewer")
330 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
331 #t)))))
332 (synopsis "Graphical console client for virtual machines")
333 (description "Graphical console client for virtual machines using SPICE or
334 VNC.")
335 (home-page "https://virt-manager.org")
336 (license license:gpl2+)))