Commit | Line | Data |
---|---|---|
1d2c67c1 DC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 David Craven <david@craven.ch> | |
e564a16e | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
1d2c67c1 DC |
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) | |
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) | |
42 | #:use-module (guix packages) | |
43 | #:use-module ((guix licenses) #:prefix license:) | |
44 | #:use-module (guix utils)) | |
45 | ||
46 | (define-public usbredir | |
41a659d2 MB |
47 | (package |
48 | (name "usbredir") | |
49 | (home-page "https://spice-space.org") | |
50 | (version "0.8.0") | |
51 | (source (origin | |
52 | (method url-fetch) | |
53 | (uri (string-append home-page "/download/" name "/" name "-" | |
54 | version ".tar.bz2")) | |
55 | (sha256 | |
56 | (base32 | |
57 | "002yik1x7kn0427xahvnhjby2np14a6xqw7c3dx530n9h5d9rg47")))) | |
58 | (build-system gnu-build-system) | |
59 | (propagated-inputs | |
60 | `(("libusb" ,libusb))) | |
61 | (native-inputs | |
62 | `(("pkg-config" ,pkg-config))) | |
63 | (synopsis "Tools for sending USB device traffic over a network") | |
64 | (description | |
65 | "Usbredir is a network protocol for sending USB device traffic over a | |
66 | network connection. It can be used to redirect traffic from a USB device to a | |
67 | different (virtual) machine than the one to which the USB device is attached.") | |
68 | (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+)))) | |
2ef2654d DC |
69 | |
70 | (define-public virglrenderer | |
71 | (package | |
72 | (name "virglrenderer") | |
8b20a4d1 | 73 | (version "0.6.0") |
2ef2654d DC |
74 | (source (origin |
75 | (method url-fetch) | |
76 | (uri (string-append | |
77 | "https://www.freedesktop.org/software/virgl/" | |
78 | "virglrenderer-" version ".tar.bz2")) | |
1e5b8bee | 79 | (patches (search-patches "virglrenderer-CVE-2017-6386.patch")) |
2ef2654d DC |
80 | (sha256 |
81 | (base32 | |
8b20a4d1 | 82 | "06kf0q4l52gzx5p63l8850hff8pmhp7xv1hk8zgx2apbw18y6jd5")))) |
2ef2654d DC |
83 | (build-system gnu-build-system) |
84 | (inputs | |
85 | `(("libepoxy" ,libepoxy) | |
86 | ("mesa" ,mesa) | |
87 | ("udev" ,eudev))) | |
88 | (native-inputs | |
89 | `(("pkg-config" ,pkg-config))) | |
90 | (synopsis "Virtual 3D GPU library") | |
91 | (description "A virtual 3D GPU library that enables a virtualized operating | |
92 | system to use the host GPU to accelerate 3D rendering.") | |
93 | (home-page "https://virgil3d.github.io") | |
94 | (license (list license:expat license:bsd-3)))) | |
289e472f DC |
95 | |
96 | (define-public spice-protocol | |
97 | (package | |
98 | (name "spice-protocol") | |
52d5b73f | 99 | (version "0.12.14") |
289e472f DC |
100 | (source (origin |
101 | (method url-fetch) | |
102 | (uri (string-append | |
5e569d5c | 103 | "https://www.spice-space.org/download/releases/" |
289e472f DC |
104 | "spice-protocol-" version ".tar.bz2")) |
105 | (sha256 | |
106 | (base32 | |
52d5b73f | 107 | "170ckpgazvqv7hxy209myg67pqnd6c0gvr4ysbqgsfch6320nd90")))) |
289e472f DC |
108 | (build-system gnu-build-system) |
109 | (synopsis "Protocol headers for the SPICE protocol") | |
110 | (description "SPICE (the Simple Protocol for Independent Computing | |
111 | Environments) is a remote-display system built for virtual environments | |
112 | which allows users to view a desktop computing environment.") | |
5e569d5c | 113 | (home-page "https://www.spice-space.org") |
289e472f | 114 | (license (list license:bsd-3 license:lgpl2.1+)))) |
bb28cf90 DC |
115 | |
116 | (define-public spice-gtk | |
117 | (package | |
118 | (name "spice-gtk") | |
206feae7 | 119 | (version "0.35") |
bb28cf90 DC |
120 | (source (origin |
121 | (method url-fetch) | |
122 | (uri (string-append | |
f057755e | 123 | "https://spice-space.org/download/gtk/" |
bb28cf90 DC |
124 | "spice-gtk-" version ".tar.bz2")) |
125 | (sha256 | |
126 | (base32 | |
206feae7 | 127 | "11lymg467gvj5ys8k22ihnfbxjn4x34ygyzirpg2nphjwlyhgrml")))) |
bb28cf90 DC |
128 | (build-system gnu-build-system) |
129 | (propagated-inputs | |
130 | `(("gstreamer" ,gstreamer) | |
131 | ("gst-libav" ,gst-libav) | |
132 | ("gst-plugins-base" ,gst-plugins-base) | |
133 | ("gst-plugins-good" ,gst-plugins-good) | |
134 | ("gst-plugins-bad" ,gst-plugins-bad) | |
ba9e2ee6 LF |
135 | ("gst-plugins-ugly" ,gst-plugins-ugly) |
136 | ("spice-protocol" ,spice-protocol))) | |
bb28cf90 DC |
137 | (inputs |
138 | `(("glib-networking" ,glib-networking) | |
c44dd0d6 | 139 | ("gobject-introspection" ,gobject-introspection) |
bb28cf90 DC |
140 | ("gtk+" ,gtk+) |
141 | ("libepoxy" ,libepoxy) | |
142 | ("libjpeg" ,libjpeg) | |
bb28cf90 DC |
143 | ("libxcb" ,libxcb) |
144 | ("lz4" ,lz4) | |
145 | ("mesa" ,mesa) | |
146 | ("pixman" ,pixman) | |
147 | ("pulseaudio" ,pulseaudio) | |
148 | ("python" ,python) | |
149 | ("openssl" ,openssl) | |
150 | ("opus" ,opus) | |
bb28cf90 DC |
151 | ("usbredir" ,usbredir))) |
152 | (native-inputs | |
153 | `(("glib:bin" ,glib "bin") | |
154 | ("intltool" ,intltool) | |
155 | ("pkg-config" ,pkg-config))) | |
156 | (arguments | |
157 | `(#:configure-flags | |
158 | '("--enable-gstaudio" | |
159 | "--enable-gstvideo" | |
c44dd0d6 AP |
160 | "--enable-pulse" |
161 | "--enable-introspection") | |
bb28cf90 DC |
162 | #:phases |
163 | (modify-phases %standard-phases | |
164 | (add-after | |
165 | 'install 'wrap-spicy | |
166 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
167 | (let ((out (assoc-ref outputs "out")) | |
168 | (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) | |
169 | (wrap-program (string-append out "/bin/spicy") | |
170 | `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))) | |
171 | #t))))) | |
172 | (synopsis "Gtk client and libraries for SPICE remote desktop servers") | |
173 | (description "Gtk client and libraries for SPICE remote desktop servers.") | |
f057755e | 174 | (home-page "https://www.spice-space.org") |
bb28cf90 | 175 | (license (list license:lgpl2.1+ license:lgpl2.0+)))) |
3cbd37e4 DC |
176 | |
177 | (define-public spice | |
178 | (package | |
179 | (name "spice") | |
f6b7ccc9 | 180 | (version "0.14.1") |
3cbd37e4 DC |
181 | (source (origin |
182 | (method url-fetch) | |
183 | (uri (string-append | |
b142756d | 184 | "https://www.spice-space.org/download/releases/" |
f6b7ccc9 | 185 | "spice-server/spice-" version ".tar.bz2")) |
3cbd37e4 DC |
186 | (sha256 |
187 | (base32 | |
f6b7ccc9 | 188 | "068mb9l7wzk4k4c65bzvpw5fyyzh81rb6z81skgdxvh67pk5vb8y")))) |
3cbd37e4 DC |
189 | (build-system gnu-build-system) |
190 | (propagated-inputs | |
191 | `(("openssl" ,openssl) | |
192 | ("pixman" ,pixman) | |
193 | ("spice-protocol" ,spice-protocol))) | |
194 | (inputs | |
5f2a7f4f DC |
195 | `(("cyrus-sasl" ,cyrus-sasl) |
196 | ("glib" ,glib) | |
9b81876f | 197 | ("libjpeg-turbo" ,libjpeg-turbo) |
3cbd37e4 DC |
198 | ("lz4" ,lz4) |
199 | ("opus" ,opus) | |
b142756d | 200 | ("orc" ,orc) |
3cbd37e4 DC |
201 | ("zlib" ,zlib))) |
202 | (native-inputs | |
203 | `(("pkg-config" ,pkg-config) | |
204 | ("python" ,python) | |
f6b7ccc9 MB |
205 | ("spice-gtk" ,spice-gtk) |
206 | ||
207 | ;; These are needed for the server listen tests. | |
208 | ("glib-networking" ,glib-networking) | |
209 | ("gsettings-desktop-schemas" ,gsettings-desktop-schemas))) | |
3cbd37e4 DC |
210 | (arguments |
211 | `(#:configure-flags | |
f6b7ccc9 MB |
212 | '("--enable-lz4" |
213 | "--enable-automated-tests") | |
8504d192 LC |
214 | |
215 | ;; Several tests appear to be opening the same sockets concurrently. | |
216 | #:parallel-tests? #f | |
217 | ||
f6b7ccc9 MB |
218 | #:phases (modify-phases %standard-phases |
219 | (add-before 'check 'use-empty-ssl-cert-file | |
220 | (lambda _ (setenv "SSL_CERT_FILE" "/dev/null") #t))))) | |
3cbd37e4 DC |
221 | (synopsis "Server implementation of the SPICE protocol") |
222 | (description "SPICE is a remote display system built for virtual | |
223 | environments which allows you to view a computing 'desktop' environment | |
224 | not only on the machine where it is running, but from anywhere on the | |
225 | Internet and from a wide variety of machine architectures.") | |
d5ae997a | 226 | (home-page "https://www.spice-space.org") |
3cbd37e4 | 227 | (license (list license:lgpl2.1+ license:lgpl2.0+)))) |
33b0f4a4 DC |
228 | |
229 | (define-public spice-vdagent | |
230 | (package | |
231 | (name "spice-vdagent") | |
232 | (version "0.17.0") | |
233 | (source (origin | |
234 | (method url-fetch) | |
235 | (uri (string-append | |
236 | "http://www.spice-space.org/download/releases/" | |
237 | "spice-vdagent-" version ".tar.bz2")) | |
238 | (sha256 | |
239 | (base32 | |
240 | "0gdkyylyg1hksg0i0anvznqfli2q39335fnrmcd6847frpc8njpi")))) | |
241 | (build-system gnu-build-system) | |
242 | (arguments | |
243 | `(#:configure-flags | |
244 | '("--localstatedir=/var") | |
245 | #:phases | |
246 | (modify-phases %standard-phases | |
247 | (add-after 'unpack 'patch-makefile.in | |
248 | (lambda _ | |
249 | (substitute* "Makefile.in" | |
250 | (((string-append "\\$\\(mkdir_p\\) \\$\\(DESTDIR\\)" | |
251 | "\\$\\(localstatedir\\)/run/spice-vdagentd")) | |
252 | "-$(mkdir_p) $(DESTDIR)$(localstatedir)/run/spice-vdagentd")) | |
e02cd2b8 DC |
253 | #t)) |
254 | (add-after 'unpack 'patch-spice-vdagent.desktop | |
255 | (lambda* (#:key outputs #:allow-other-keys) | |
256 | (substitute* "data/spice-vdagent.desktop" | |
3f995aaf | 257 | (("Exec=/usr/bin/spice-vdagent") |
e02cd2b8 DC |
258 | (string-append "Exec=" (assoc-ref outputs "out") |
259 | "/bin/spice-vdagent"))) | |
33b0f4a4 DC |
260 | #t))))) |
261 | (inputs | |
262 | `(("alsa-lib" ,alsa-lib) | |
263 | ("dbus" ,dbus) | |
264 | ("glib" ,glib) | |
265 | ("libpciaccess" ,libpciaccess) | |
266 | ("libx11" ,libx11) | |
267 | ("libxext" ,libxext) | |
268 | ("libxfixes" ,libxfixes) | |
269 | ("libxinerama" ,libxinerama) | |
270 | ("libxrandr" ,libxrandr) | |
271 | ("spice-protocol" ,spice-protocol))) | |
272 | (native-inputs | |
273 | `(("pkg-config" ,pkg-config))) | |
274 | (synopsis "Spice agent for Linux") | |
275 | (description "Spice-vdagent enables sharing the clipboard and guest display | |
276 | resolution scaling on graphical console window resize.") | |
d5ae997a | 277 | (home-page "https://www.spice-space.org") |
33b0f4a4 | 278 | (license license:gpl3+))) |
6144dff5 DC |
279 | |
280 | (define-public virt-viewer | |
281 | (package | |
282 | (name "virt-viewer") | |
800248fe | 283 | (version "7.0") |
6144dff5 DC |
284 | (source (origin |
285 | (method url-fetch) | |
286 | (uri (string-append | |
287 | "https://virt-manager.org/download/sources/virt-viewer/" | |
288 | "virt-viewer-" version ".tar.gz")) | |
289 | (sha256 | |
290 | (base32 | |
800248fe | 291 | "00y9vi69sja4pkrfnvrkwsscm41bqrjzvp8aijb20pvg6ymczhj7")))) |
6144dff5 DC |
292 | (build-system gnu-build-system) |
293 | (inputs | |
294 | `(("gtk+" ,gtk+) | |
295 | ("libcap" ,libcap) | |
296 | ("libxml2" ,libxml2) | |
297 | ("openssl" ,openssl) | |
f54510d2 | 298 | ("spice-gtk" ,spice-gtk))) |
6144dff5 DC |
299 | (native-inputs |
300 | `(("glib:bin" ,glib "bin") | |
301 | ("intltool" ,intltool) | |
302 | ("pkg-config" ,pkg-config))) | |
303 | (arguments | |
304 | `(#:configure-flags | |
305 | '("--with-spice-gtk") | |
306 | #:phases | |
307 | (modify-phases %standard-phases | |
308 | (add-after | |
309 | 'install 'wrap-remote-viewer | |
310 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
311 | (let ((out (assoc-ref outputs "out")) | |
312 | (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))) | |
313 | (wrap-program (string-append out "/bin/remote-viewer") | |
314 | `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))) | |
315 | #t))))) | |
316 | (synopsis "Graphical console client for virtual machines") | |
317 | (description "Graphical console client for virtual machines using SPICE or | |
318 | VNC.") | |
319 | (home-page "https://virt-manager.org") | |
320 | (license license:gpl2+))) |