projects/guix·blob ruby-team · refs

506 lines · 19.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Oleg Pykhalov <[email protected]>
3;;; Copyright © 2020 Hartmut Goebel <[email protected]>
4;;; Copyright © 2020 Marius Bakke <[email protected]>
5;;; Copyright © 2020 Vincent Legoll <[email protected]>
6;;; Copyright © 2021, 2022, 2024 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2022, 2024, 2026 Maxim Cournoyer <[email protected]>
8;;; Copyright © 2022 Mehmet Tekman <[email protected]>
9;;; Copyright @ 2022, Kitzman <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages vnc)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system meson)
30 #:use-module (guix download)
31 #:use-module (guix gexp)
32 #:use-module (guix git-download)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix gexp)
35 #:use-module (guix git-download)
36 #:use-module (guix packages)
37 #:use-module (guix utils)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages c)
43 #:use-module (gnu packages cmake)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages dns)
49 #:use-module (gnu packages fltk)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gnupg)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages java)
61 #:use-module (gnu packages libevent)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages man)
64 #:use-module (gnu packages pcre)
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages rdesktop)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages spice)
71 #:use-module (gnu packages ssh)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages video)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages webkit)
76 #:use-module (gnu packages xdisorg)
77 #:use-module (gnu packages xorg))
78
79(define-public remmina
80 (package
81 (name "remmina")
82 (version "1.4.43")
83 (source
84 (origin
85 (method git-fetch)
86 (uri
87 (git-reference
88 (url "https://gitlab.com/Remmina/Remmina.git")
89 (commit (string-append "v" version))))
90 (file-name (git-file-name name version))
91 (sha256
92 (base32 "1hk8g26z10illchjr59l5fm2vjps85nnm7ir9l2yx9sn34v3cxpf"))))
93 (build-system cmake-build-system)
94 (arguments
95 `(#:tests? #f ; No target
96 #:configure-flags
97 (list
98 ;; Disable online version checking.
99 "-DWITH_NEWS=OFF")
100 #:imported-modules
101 ((guix build glib-or-gtk-build-system)
102 ,@%cmake-build-system-modules)
103 #:modules
104 (((guix build glib-or-gtk-build-system)
105 #:prefix glib-or-gtk:)
106 (guix build cmake-build-system)
107 (guix build utils))
108 #:phases
109 (modify-phases %standard-phases
110 (add-after 'install 'glib-or-gtk-compile-schemas
111 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
112 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
113 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
114 (add-after 'glib-or-gtk-wrap 'wrap-typelibs
115 (lambda* (#:key outputs #:allow-other-keys)
116 (let ((out (assoc-ref outputs "out")))
117 (for-each
118 (lambda (name)
119 (let ((file (string-append out "/bin/" name))
120 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
121 (wrap-program file
122 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))
123 '("remmina" "remmina-file-wrapper"))))))))
124 (native-inputs
125 (list gettext-minimal
126 `(,glib "bin")
127 gobject-introspection
128 `(,gtk+ "bin")
129 intltool
130 pkg-config))
131 (inputs
132 (list libappindicator
133 at-spi2-core
134 avahi
135 bash-minimal
136 cairo
137 cups
138 curl
139 ffmpeg
140 freerdp ; for rdp plugin
141 libgcrypt
142 (librsvg-for-system)
143 glib
144 gnome-keyring
145 gsettings-desktop-schemas
146 gtk+
147 harfbuzz
148 json-glib
149 libsecret ; for secret plugin
150 libsoup
151 libssh ; for ssh plugin
152 libvnc ; for vnc plugin
153 openssl
154 pango
155 pcre2 ; for exec plugin
156 python-minimal-wrapper ; for python wrapper plugin
157 shared-mime-info
158 libsodium
159 spice-gtk ; for spice plugin
160 telepathy-glib
161 vte/gtk+-3 ; for st plugin
162 wayland
163 webkitgtk-for-gtk3 ; for www plugin
164 libx11
165 libxext ; for xdmcp plugin
166 xdg-utils
167 libxkbfile)) ; for nx plugin
168 (propagated-inputs
169 (list dconf))
170 (home-page "https://remmina.org/")
171 (synopsis "Remote Desktop Client")
172 (description "Remmina is a client to use other desktops remotely.
173RDP, VNC, SPICE, NX, XDMCP, SSH and EXEC network protocols are supported.")
174 (license license:gpl2+)))
175
176(define-public turbovnc
177 (package
178 (name "turbovnc")
179 (version "3.3")
180 (source
181 (origin
182 (method git-fetch)
183 (uri (git-reference
184 (url "https://github.com/TurboVNC/turbovnc")
185 (commit version)))
186 (modules '((guix build utils)
187 (ice-9 ftw)
188 (srfi srfi-26)))
189 (snippet
190 #~(begin
191 ;; There are a few bundled Java libraries, such as jsch and jzlib,
192 ;; bundled under java/com/jcraft/ as well as mindrot and spf4j,
193 ;; bundled under java/org. These are used by the 'vncviewer'
194 ;; program. The jsch copy is modified and integrates changes from
195 ;; https://github.com/mwiede/jsch, so cannot easily be un-bundled.
196 (define (delete-all-but directory . preserve)
197 (with-directory-excursion directory
198 (let* ((pred (negate (cut member <>
199 (cons* "." ".." preserve))))
200 (items (scandir "." pred)))
201 (for-each (cut delete-file-recursively <>) items))))
202
203 ;; d3des, rfb (headers) and turbojpeg-jni are small and not
204 ;; packaged in Guix, so preserve them.
205 (delete-all-but "common" "d3des" "rfb" "turbojpeg-jni")
206 ;; Delete bundled headers which aren't used.
207 (delete-all-but "unix/Xvnc/include" "tvnc_version.h.in")
208 ;; This 243 lines of code C library is used by
209 ;; unix/Xvnc/programs/Xserver/os/xsha1.c.
210 (delete-all-but "unix/Xvnc/lib" "CMakeLists.txt" "libsha1")))
211 (sha256
212 (base32
213 "0q53r9j2sy77hgfbm4af1nbixwlhpdh5zz6as3wkk8wv1f27xqdk"))))
214 (build-system cmake-build-system)
215 (arguments
216 (list
217 #:tests? #f ;no test suite
218 #:configure-flags
219 ;; Use system libraries.
220 #~(list "-DTVNC_SYSTEMLIBS=ON"
221 "-DTVNC_SYSTEMX11=ON"
222 "-DTVNC_DLOPENSSL=OFF"
223 (string-append "-DXORG_DRI_DRIVER_PATH="
224 (search-input-directory %build-inputs "lib/dri"))
225 (string-append "-DXORG_FONT_PATH="
226 "/run/current-system/profile/share/fonts/X11,"
227 (string-append #$(this-package-input "font-alias")
228 "share/fonts/X11"))
229 (string-append "-DXORG_REGISTRY_PATH="
230 (dirname (search-input-file
231 %build-inputs "lib/xorg/protocol.txt")))
232 (string-append "-DXKB_BASE_DIRECTORY="
233 (search-input-directory %build-inputs
234 "share/X11/xkb"))
235 (string-append "-DXKB_BIN_DIRECTORY="
236 (dirname (search-input-file %build-inputs
237 "bin/xkbcomp")))
238 ;; The default rule is 'xorg', which doesn't match the 'base'
239 ;; rule file installed by our version of xkeyboard-config.
240 ;; Without this change, running Xvnc would fail with the error
241 ;; "XKB: Failed to compile keymap"
242 "-DXKB_DFLT_RULES=base"
243 ;; Mimic xorg-server's "--with-xkb-output=/tmp" configuration.
244 "-DCOMPILEDDEFAULTFONTPATH=/tmp"
245 "-DTVNC_STATIC_XORG_PATHS=ON"
246 "-DTVNC_ZLIBNG=OFF") ;avoid using the bundled zlib-ng source
247 #:phases
248 #~(modify-phases %standard-phases
249 (add-after 'unpack 'patch-vncviewer
250 (lambda* (#:key inputs #:allow-other-keys)
251 (define openjdk #$(this-package-input "openjdk"))
252 (substitute* "unix/vncviewer/vncviewer.in"
253 (("\\$BINDIR/../java/jre")
254 openjdk)
255 ;; Avoid resorting to grep and sed to locate libjawt.so.
256 (("^_TMP=.*")
257 (string-append "_TMP=" openjdk "/lib\n")))))
258 (add-after 'unpack 'patch-xstartup.turbovnc
259 (lambda* (#:key inputs #:allow-other-keys)
260 (substitute* "unix/xstartup.turbovnc"
261 (("DBUS_LAUNCH=[[:graph:]]+")
262 (format #f "DBUS_LAUNCH=~a"
263 (search-input-file inputs "bin/dbus-launch")))
264 (("XSESSIONSDIR=[[:graph:]]+")
265 (format #f "XSESSIONSDIR=~a"
266 "/run/current-system/profile/share/xsessions"))
267 (("GREP=[[:graph:]]+")
268 (format #f "GREP=~a"
269 (search-input-file inputs "bin/grep")))
270 (("SED=[[:graph:]]+")
271 (format #f "SED=~a"
272 (search-input-file inputs "bin/sed")))
273 (("TVNC_SSHAGENT=[[:graph:]]+")
274 (format #f "TVNC_SSHAGENT=~a"
275 (search-input-file inputs "bin/ssh-agent")))
276 (("TVNC_VGLRUN=\"vglrun" all)
277 (string-append "TVNC_VGLRUN="
278 (search-input-file inputs "bin/vglrun") all)))))
279 (add-after 'install 'wrap-vncserver
280 (lambda* (#:key inputs outputs #:allow-other-keys)
281 (wrap-script (search-input-file outputs "bin/vncserver")
282 (list "PATH" 'prefix
283 (map (lambda (p)
284 (dirname (search-input-file inputs p)))
285 '("bin/uname" ;coreutils
286 "bin/xauth"
287 "bin/xdpyinfo"))))))
288 (add-after 'install 'wrap-xstartup.turbovnc
289 (lambda* (#:key inputs outputs #:allow-other-keys)
290 (wrap-script (search-input-file outputs "bin/xstartup.turbovnc")
291 (list "PATH" 'prefix
292 (map (lambda (p)
293 (dirname (search-input-file inputs p)))
294 '("bin/uname" ;coreutils
295 ;; These are used as the fallback when no desktop
296 ;; session was found.
297 "bin/twm"
298 "bin/xsetroot"
299 "bin/xterm")))))))))
300 (native-inputs
301 (list `(,openjdk "jdk")
302 pkg-config
303 python))
304 (inputs
305 (list dbus
306 font-alias
307 freetype
308 guile-3.0
309 libfontenc
310 libjpeg-turbo
311 libx11
312 libxdamage
313 libxext
314 libxfont2
315 libxi
316 libxkbfile
317 linux-pam
318 mesa
319 openjdk
320 openssh
321 openssl
322 perl
323 pixman
324 twm
325 virtualgl
326 xauth
327 xdpyinfo
328 xkbcomp
329 xkeyboard-config
330 xorg-server
331 xorgproto
332 xsetroot
333 xterm
334 xtrans
335 zlib))
336 (home-page "https://turbovnc.org/")
337 (synopsis "Highly-optimized VNC remote desktop software")
338 (description "TurboVNC is a high-speed version of VNC derived from
339TightVNC, with which it remains compatible. It contains a variant of Tight
340encoding that is tuned to maximize performance for image-intensive
341applications (such as VirtualGL, video applications, and image editors) while
342still providing excellent performance for other types of applications. Some
343of its unique features are:
344@itemize
345@item a user-facing @command{vncserver} command;
346@item the ability to capture keyboard keys even when not in full screen mode;
347@item a full screen mode that is compatible with ratpoison*
348@end itemize
349*Although due to a quirk in Java, you'll want to set the
350@env{_JAVA_AWT_WM_NONREPARENTING} environment variable when using it with
351ratpoison.")
352 (license license:gpl2+)))
353
354(define-public x11vnc
355 ;; The release version of 0.9.16 requires patches to work, so we pin to the
356 ;; latest working commit
357 (let ((commit "3e4dc8ef2985a6e670e1d9649fe55395c2b31039")
358 (revision "0"))
359 (package
360 (name "x11vnc")
361 (version (git-version "0.9.16" revision commit))
362 (source (origin
363 (method git-fetch)
364 (uri (git-reference
365 (url "https://github.com/LibVNC/x11vnc")
366 (commit commit)))
367 (file-name (git-file-name name version))
368 (sha256
369 (base32
370 "0a120gv9h3whiznlddl0j3nz3400jjgl97znaincm5i2m5pnjifs"))))
371 (build-system gnu-build-system)
372 (arguments
373 (list #:phases #~(modify-phases %standard-phases
374 (add-before 'bootstrap 'delete-premature-configure
375 (lambda _
376 (substitute* "./autogen.sh"
377 ((".*/configure")
378 "")))))))
379 (native-inputs (list autoconf automake autobuild pkg-config))
380 (inputs (list avahi
381 libjpeg-turbo
382 libvnc
383 libx11
384 libxcomposite
385 libxdamage
386 libxext
387 libxfixes
388 libxi
389 libxinerama
390 libxrandr
391 libxtst
392 openssl
393 xdpyinfo
394 xf86-video-dummy
395 zlib))
396 (synopsis "VNC server for real X displays")
397 (home-page "https://github.com/LibVNC/x11vnc")
398 (description
399 "x11vnc allows one to view and interact with real remote X
400displays (i.e. a display corresponding to a physical monitor, keyboard, and
401mouse) with any VNC viewer.")
402 (license license:gpl2+))))
403
404(define-public libvnc
405 (package
406 (name "libvnc")
407 (version "0.9.15")
408 (source
409 (origin
410 (method git-fetch)
411 (uri (git-reference
412 (url "https://github.com/LibVNC/libvncserver")
413 (commit (string-append "LibVNCServer-" version))))
414 (file-name (git-file-name name version))
415 (sha256
416 (base32 "0b3ik1dbd9lyiiavv3zpyb3iycnfvjgsjym0ilyr1yac6899qxkb"))))
417 (build-system cmake-build-system)
418 (arguments
419 '(#:phases (modify-phases %standard-phases
420 (add-after 'unpack 'patch-cc-reference
421 (lambda _
422 (substitute* "test/includetest.sh"
423 (("^cc -I")
424 "gcc -I"))
425 #t)))))
426 (native-inputs
427 (list pkg-config))
428 (inputs
429 `(("gnutls" ,gnutls)
430 ("libgcrypt" ,libgcrypt)
431 ("libjpeg" ,libjpeg-turbo)
432 ("libpng" ,libpng)
433 ("lzo" ,lzo)
434 ("sdl2" ,sdl2)))
435 (home-page "https://libvnc.github.io/")
436 (synopsis "Cross-platform C libraries for implementing VNC server or
437client")
438 (description "This package provides @code{LibVNCServer} and
439@code{LibVNCClient}. These are cross-platform C libraries that allow you to
440easily implement VNC server or client functionality in your program.")
441 (license ;; GPL for programs, FDL for documentation
442 (list license:gpl2+ license:fdl1.2+))))
443
444(define-public neatvnc
445 (package
446 (name "neatvnc")
447 (version "0.9.4")
448 (source (origin
449 (method git-fetch)
450 (uri (git-reference
451 (url "https://github.com/any1/neatvnc")
452 (commit (string-append "v" version))))
453 (file-name (git-file-name name version))
454 (sha256
455 (base32
456 "09vafk99zmrbrb5mxr1sqb21rvggbr69kx7rwqf2g6dxk07p1mqg"))))
457 (build-system meson-build-system)
458 (native-inputs (list pkg-config))
459 (inputs
460 (list libdrm libglvnd libxkbcommon pixman aml gnutls libjpeg-turbo zlib))
461 (home-page "https://github.com/any1/neatvnc")
462 (synopsis "Lightweight VNC server library")
463 (description "NeatVNC is a lightweight VNC server library, supporting
464authentication, SSH tunneling, and ZRLE or Tight encoding.")
465 (license license:isc)))
466
467(define-public wayvnc
468 (package
469 (name "wayvnc")
470 (version "0.9.1")
471 (source
472 (origin
473 (method git-fetch)
474 (uri (git-reference
475 (url "https://github.com/any1/wayvnc")
476 (commit (string-append "v" version))))
477 (file-name (git-file-name name version))
478 (sha256
479 (base32 "1brnzwabnrhjblcfymwxsg4z58pzdnlql1mgsmijp0kw5n8770rc"))))
480 (build-system meson-build-system)
481 (native-inputs
482 (append (if (%current-target-system)
483 ;; for wayland-scanner
484 (list wayland)
485 '())
486 (list pkg-config scdoc)))
487 (inputs (list aml
488 neatvnc
489 zlib
490 libjpeg-turbo
491 gnutls
492 jansson
493 libdrm
494 pixman
495 libglvnd
496 libxkbcommon
497 wayland))
498 (home-page "https://github.com/any1/wayvnc")
499 (synopsis "VNC server for wlroots-based Wayland compositors")
500 (description
501 "This is a VNC server for wlroots-based Wayland compositors.
502It attaches to a running Wayland session, creates virtual input devices, and
503exposes a single display via the RFB protocol. The Wayland session may be a
504headless one, so it is also possible to run wayvnc without a physical display
505attached.")
506 (license license:isc)))