gnu: python-pandas: Fix build on 32-bit.
[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 "http://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 (sha256
106 (base32
107 "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5"))))
108 (build-system gnu-build-system)
109 (inputs
110 `(("libepoxy" ,libepoxy)
111 ("mesa" ,mesa)
112 ("udev" ,eudev)))
113 (native-inputs
114 `(("pkg-config" ,pkg-config)))
115 (synopsis "Virtual 3D GPU library")
116 (description "A virtual 3D GPU library that enables a virtualized operating
117 system to use the host GPU to accelerate 3D rendering.")
118 (home-page "https://virgil3d.github.io")
119 (license (list license:expat license:bsd-3))))
120
121 (define-public spice-protocol
122 (package
123 (name "spice-protocol")
124 (version "0.12.12")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append
128 "https://www.spice-space.org/download/releases/"
129 "spice-protocol-" version ".tar.bz2"))
130 (sha256
131 (base32
132 "00wx81f2ml62g3maw63jq9w217zym921rdi38h7lpm5m8ckxraqp"))))
133 (build-system gnu-build-system)
134 (synopsis "Protocol headers for the SPICE protocol")
135 (description "SPICE (the Simple Protocol for Independent Computing
136 Environments) is a remote-display system built for virtual environments
137 which allows users to view a desktop computing environment.")
138 (home-page "https://www.spice-space.org")
139 (license (list license:bsd-3 license:lgpl2.1+))))
140
141 (define-public spice-gtk
142 (package
143 (name "spice-gtk")
144 (version "0.33")
145 (source (origin
146 (method url-fetch)
147 (uri (string-append
148 "https://spice-space.org/download/gtk/"
149 "spice-gtk-" version ".tar.bz2"))
150 (sha256
151 (base32
152 "0fdgx9k4vgmasp8i2n0swrkapq8f212igcg7wsgvr3mbhsvk7bvx"))))
153 (build-system gnu-build-system)
154 (propagated-inputs
155 `(("gstreamer" ,gstreamer)
156 ("gst-libav" ,gst-libav)
157 ("gst-plugins-base" ,gst-plugins-base)
158 ("gst-plugins-good" ,gst-plugins-good)
159 ("gst-plugins-bad" ,gst-plugins-bad)
160 ("gst-plugins-ugly" ,gst-plugins-ugly)
161 ("spice-protocol" ,spice-protocol)))
162 (inputs
163 `(("glib-networking" ,glib-networking)
164 ("gtk+" ,gtk+)
165 ("libepoxy" ,libepoxy)
166 ("libjpeg" ,libjpeg)
167 ("libxcb" ,libxcb)
168 ("lz4" ,lz4)
169 ("mesa" ,mesa)
170 ("pixman" ,pixman)
171 ("pulseaudio" ,pulseaudio)
172 ("python" ,python)
173 ("openssl" ,openssl)
174 ("opus" ,opus)
175 ("usbredir" ,usbredir)))
176 (native-inputs
177 `(("glib:bin" ,glib "bin")
178 ("intltool" ,intltool)
179 ("pkg-config" ,pkg-config)))
180 (arguments
181 `(#:configure-flags
182 '("--enable-gstaudio"
183 "--enable-gstvideo"
184 "--enable-pulse")
185 #:phases
186 (modify-phases %standard-phases
187 (add-after
188 'install 'wrap-spicy
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let ((out (assoc-ref outputs "out"))
191 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
192 (wrap-program (string-append out "/bin/spicy")
193 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))))
194 #t)))))
195 (synopsis "Gtk client and libraries for SPICE remote desktop servers")
196 (description "Gtk client and libraries for SPICE remote desktop servers.")
197 (home-page "https://www.spice-space.org")
198 (license (list license:lgpl2.1+ license:lgpl2.0+))))
199
200 (define-public spice
201 (package
202 (name "spice")
203 (version "0.12.8")
204 (source (origin
205 (method url-fetch)
206 (uri (string-append
207 "http://www.spice-space.org/download/releases/"
208 "spice-" version ".tar.bz2"))
209 (sha256
210 (base32
211 "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr"))
212 (patches
213 (search-patches "spice-CVE-2016-9577.patch"
214 "spice-CVE-2016-9578-1.patch"
215 "spice-CVE-2016-9578-2.patch"))))
216 (build-system gnu-build-system)
217 (propagated-inputs
218 `(("openssl" ,openssl)
219 ("pixman" ,pixman)
220 ("spice-protocol" ,spice-protocol)))
221 (inputs
222 `(("cyrus-sasl" ,cyrus-sasl)
223 ("glib" ,glib)
224 ("libjpeg-turbo" ,libjpeg-turbo)
225 ("lz4" ,lz4)
226 ("opus" ,opus)
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 "4.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 "07zsi1fqg05mag1ayniaqj25fzb6dxg76d4ka5196lq4l477nhhw"))))
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+)))