Commit | Line | Data |
---|---|---|
1d2c67c1 DC |
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) | |
37d52f6e | 21 | #:use-module (gnu packages autotools) ; remove after updating usbredir to 0.7.1+ |
bb28cf90 | 22 | #:use-module (gnu packages compression) |
5f2a7f4f | 23 | #:use-module (gnu packages cyrus-sasl) |
2ef2654d | 24 | #:use-module (gnu packages gl) |
bb28cf90 DC |
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) | |
1d2c67c1 | 30 | #:use-module (gnu packages libusb) |
2ef2654d | 31 | #:use-module (gnu packages linux) |
1d2c67c1 | 32 | #:use-module (gnu packages pkg-config) |
bb28cf90 DC |
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) | |
6144dff5 | 39 | #:use-module (gnu packages xml) |
1d2c67c1 DC |
40 | #:use-module (guix build-system gnu) |
41 | #:use-module (guix download) | |
37d52f6e | 42 | #:use-module (guix git-download) ; remove after updating usbredir to 0.7.1+ |
1d2c67c1 DC |
43 | #:use-module (guix packages) |
44 | #:use-module ((guix licenses) #:prefix license:) | |
45 | #:use-module (guix utils)) | |
46 | ||
47 | (define-public usbredir | |
273f1c05 DC |
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 "http://cgit.freedesktop.org/spice/usbredir") | |
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))) | |
8cce8797 DC |
82 | (arguments |
83 | `(#:phases | |
84 | (modify-phases %standard-phases | |
85 | (add-after 'unpack 'autogen | |
86 | (lambda _ | |
87 | (zero? (system* "autoreconf" "-vfi"))))))) | |
273f1c05 DC |
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+))))) | |
2ef2654d DC |
95 | |
96 | (define-public virglrenderer | |
97 | (package | |
98 | (name "virglrenderer") | |
99 | (version "0.5.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 | "1dj0j8nbyr7nrpds4dqlp43ji8ixjyqhgw6ywlz1r9dn6cs5m5d1")))) | |
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)))) | |
289e472f DC |
120 | |
121 | (define-public spice-protocol | |
122 | (package | |
123 | (name "spice-protocol") | |
124 | (version "0.12.11") | |
125 | (source (origin | |
126 | (method url-fetch) | |
127 | (uri (string-append | |
128 | "http://www.spice-space.org/download/releases/" | |
129 | "spice-protocol-" version ".tar.bz2")) | |
130 | (sha256 | |
131 | (base32 | |
132 | "0c33kg3vdz3nnl2wjfbgmszz5hbjbvsw6map35dj9hxnpwwf9fi2")))) | |
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 "http://www.spice-space.org") | |
139 | (license (list license:bsd-3 license:lgpl2.1+)))) | |
bb28cf90 DC |
140 | |
141 | (define-public spice-gtk | |
142 | (package | |
143 | (name "spice-gtk") | |
144 | (version "0.32") | |
145 | (source (origin | |
146 | (method url-fetch) | |
147 | (uri (string-append | |
148 | "http://spice-space.org/download/gtk/" | |
149 | "spice-gtk-" version ".tar.bz2")) | |
150 | (sha256 | |
151 | (base32 | |
152 | "00pf94xh2xf0h1g13lnavxrysd0d0x22l5jl108cvq1mjc4z8j2c")))) | |
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) | |
ba9e2ee6 LF |
160 | ("gst-plugins-ugly" ,gst-plugins-ugly) |
161 | ("spice-protocol" ,spice-protocol))) | |
bb28cf90 DC |
162 | (inputs |
163 | `(("glib-networking" ,glib-networking) | |
164 | ("gtk+" ,gtk+) | |
165 | ("libepoxy" ,libepoxy) | |
166 | ("libjpeg" ,libjpeg) | |
bb28cf90 DC |
167 | ("libxcb" ,libxcb) |
168 | ("lz4" ,lz4) | |
169 | ("mesa" ,mesa) | |
170 | ("pixman" ,pixman) | |
171 | ("pulseaudio" ,pulseaudio) | |
172 | ("python" ,python) | |
173 | ("openssl" ,openssl) | |
174 | ("opus" ,opus) | |
bb28cf90 DC |
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 "http://www.spice-space.org") | |
198 | (license (list license:lgpl2.1+ license:lgpl2.0+)))) | |
3cbd37e4 DC |
199 | |
200 | (define-public spice | |
201 | (package | |
202 | (name "spice") | |
5f2a7f4f | 203 | (version "0.12.8") |
3cbd37e4 DC |
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 | |
5f2a7f4f | 211 | "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr")))) |
3cbd37e4 DC |
212 | (build-system gnu-build-system) |
213 | (propagated-inputs | |
214 | `(("openssl" ,openssl) | |
215 | ("pixman" ,pixman) | |
216 | ("spice-protocol" ,spice-protocol))) | |
217 | (inputs | |
5f2a7f4f DC |
218 | `(("cyrus-sasl" ,cyrus-sasl) |
219 | ("glib" ,glib) | |
9b81876f | 220 | ("libjpeg-turbo" ,libjpeg-turbo) |
3cbd37e4 DC |
221 | ("lz4" ,lz4) |
222 | ("opus" ,opus) | |
223 | ("zlib" ,zlib))) | |
224 | (native-inputs | |
225 | `(("pkg-config" ,pkg-config) | |
226 | ("python" ,python) | |
227 | ("spice-gtk" ,spice-gtk))) | |
228 | (arguments | |
229 | `(#:configure-flags | |
230 | '("--disable-celt051" ; Disable support for unpackaged audio codec | |
231 | "--enable-lz4" | |
232 | "--enable-automated-tests"))) | |
233 | (synopsis "Server implementation of the SPICE protocol") | |
234 | (description "SPICE is a remote display system built for virtual | |
235 | environments which allows you to view a computing 'desktop' environment | |
236 | not only on the machine where it is running, but from anywhere on the | |
237 | Internet and from a wide variety of machine architectures.") | |
238 | (home-page "http://www.spice-space.org") | |
239 | (license (list license:lgpl2.1+ license:lgpl2.0+)))) | |
33b0f4a4 DC |
240 | |
241 | (define-public spice-vdagent | |
242 | (package | |
243 | (name "spice-vdagent") | |
244 | (version "0.17.0") | |
245 | (source (origin | |
246 | (method url-fetch) | |
247 | (uri (string-append | |
248 | "http://www.spice-space.org/download/releases/" | |
249 | "spice-vdagent-" version ".tar.bz2")) | |
250 | (sha256 | |
251 | (base32 | |
252 | "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi")))) | |
253 | (build-system gnu-build-system) | |
254 | (arguments | |
255 | `(#:configure-flags | |
256 | '("--localstatedir=/var") | |
257 | #:phases | |
258 | (modify-phases %standard-phases | |
259 | (add-after 'unpack 'patch-makefile.in | |
260 | (lambda _ | |
261 | (substitute* "Makefile.in" | |
262 | (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)" | |
263 | "\\$\\(localstatedir\\)/run/spice-vdagentd")) | |
264 | "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd")) | |
e02cd2b8 DC |
265 | #t)) |
266 | (add-after 'unpack 'patch-spice-vdagent.desktop | |
267 | (lambda* (#:key outputs #:allow-other-keys) | |
268 | (substitute* "data/spice-vdagent.desktop" | |
269 | (("Exec=/usr/bin/spice-vdagent\n") | |
270 | (string-append "Exec=" (assoc-ref outputs "out") | |
271 | "/bin/spice-vdagent"))) | |
33b0f4a4 DC |
272 | #t))))) |
273 | (inputs | |
274 | `(("alsa-lib" ,alsa-lib) | |
275 | ("dbus" ,dbus) | |
276 | ("glib" ,glib) | |
277 | ("libpciaccess" ,libpciaccess) | |
278 | ("libx11" ,libx11) | |
279 | ("libxext" ,libxext) | |
280 | ("libxfixes" ,libxfixes) | |
281 | ("libxinerama" ,libxinerama) | |
282 | ("libxrandr" ,libxrandr) | |
283 | ("spice-protocol" ,spice-protocol))) | |
284 | (native-inputs | |
285 | `(("pkg-config" ,pkg-config))) | |
286 | (synopsis "Spice agent for Linux") | |
287 | (description "Spice-vdagent enables sharing the clipboard and guest display | |
288 | resolution scaling on graphical console window resize.") | |
289 | (home-page "http://www.spice-space.org") | |
290 | (license license:gpl3+))) | |
6144dff5 DC |
291 | |
292 | (define-public virt-viewer | |
293 | (package | |
294 | (name "virt-viewer") | |
295 | (version "4.0") | |
296 | (source (origin | |
297 | (method url-fetch) | |
298 | (uri (string-append | |
299 | "https://virt-manager.org/download/sources/virt-viewer/" | |
300 | "virt-viewer-" version ".tar.gz")) | |
301 | (sha256 | |
302 | (base32 | |
303 | "07zsi1fqg05mag1ayniaqj25fzb6dxg76d4ka5196lq4l477nhhw")))) | |
304 | (build-system gnu-build-system) | |
305 | (inputs | |
306 | `(("gtk+" ,gtk+) | |
307 | ("libcap" ,libcap) | |
308 | ("libxml2" ,libxml2) | |
309 | ("openssl" ,openssl) | |
f54510d2 | 310 | ("spice-gtk" ,spice-gtk))) |
6144dff5 DC |
311 | (native-inputs |
312 | `(("glib:bin" ,glib "bin") | |
313 | ("intltool" ,intltool) | |
314 | ("pkg-config" ,pkg-config))) | |
315 | (arguments | |
316 | `(#:configure-flags | |
317 | '("--with-spice-gtk") | |
318 | #:phases | |
319 | (modify-phases %standard-phases | |
320 | (add-after | |
321 | 'install 'wrap-remote-viewer | |
322 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
323 | (let ((out (assoc-ref outputs "out")) | |
324 | (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) | |
325 | (wrap-program (string-append out "/bin/remote-viewer") | |
326 | `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))) | |
327 | #t))))) | |
328 | (synopsis "Graphical console client for virtual machines") | |
329 | (description "Graphical console client for virtual machines using SPICE or | |
330 | VNC.") | |
331 | (home-page "https://virt-manager.org") | |
332 | (license license:gpl2+))) |