projects/guix·blob javascript-team · refs

248 lines · 9.0 KiB

1;;; This file is part of GNU Guix.
2;;; Copyright © 2024 Nicolas Debonnaire <[email protected]>
3;;; Copyright © 2024 Maxim Cournoyer <[email protected]>
4;;;
5;;; GNU Guix is free software; you can redistribute it and/or modify it
6;;; under the terms of the GNU General Public License as published by
7;;; the Free Software Foundation; either version 3 of the License, or (at
8;;; your option) any later version.
9;;;
10;;; GNU Guix is distributed in the hope that it will be useful, but
11;;; WITHOUT ANY WARRANTY; without even the implied warranty of
12;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13;;; GNU General Public License for more details.
14;;;
15;;; You should have received a copy of the GNU General Public License
16;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
17
18(define-module (gnu packages nx)
19 #:use-module (guix build-system gnu)
20 #:use-module (guix download)
21 #:use-module (guix gexp)
22 #:use-module (guix git-download)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages autotools)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
29 #:use-module (gnu packages commencement)
30 #:use-module (gnu packages cups)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages image)
34 #:use-module (gnu packages man)
35 #:use-module (gnu packages onc-rpc)
36 #:use-module (gnu packages openldap)
37 #:use-module (gnu packages patchutils)
38 #:use-module (gnu packages perl)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages qt)
43 #:use-module (gnu packages ssh)
44 #:use-module (gnu packages xdisorg)
45 #:use-module (gnu packages xml)
46 #:use-module (gnu packages xorg))
47
48(define-public nx-libs
49 (package
50 (name "nx-libs")
51 (version "3.5.99.27")
52 (source
53 (origin
54 (method git-fetch)
55 (uri (git-reference
56 (url "https://github.com/ArcticaProject/nx-libs")
57 (commit version)))
58 (file-name (git-file-name name version))
59 (sha256
60 (base32 "0ykbza39ksycpyydaiwwbp7hkmdk96v7b36pn989k39lhfwnn8kz"))))
61 (build-system gnu-build-system)
62 (arguments
63 (list
64 #:tests? #f ;no test suite
65 ;; The build randomly fails when run in parallel (see:
66 ;; https://github.com/ArcticaProject/nx-libs/issues/1072).
67 #:parallel-build? #f
68 #:make-flags #~(let ((sh (search-input-file %build-inputs "bin/sh")))
69 (list (string-append "PREFIX=" #$output)
70 (string-append "ETCDIR_NX=" #$output "/etc")
71 (string-append "LOCAL_LDFLAGS=-Wl,"
72 "-rpath=" #$output "/lib,"
73 "-rpath=" #$output "/lib/nx/X11")
74 (string-append "IMAKE_DEFINES=-DUseTIRPC=1"
75 " -DBourneShell=" sh
76 " -DProjectRoot=" #$output
77 " -DDefaultUserPath="
78 #$output "/bin")
79 (string-append "CONFIG_SHELL=" sh)
80 (string-append "SHELL=" sh)
81 ;; Autoreconf being run by Make, the generated
82 ;; configure script shebangs thus haven't been
83 ;; patched; workaround this by running explicitly
84 ;; via the shell.
85 (string-append "CONFIGURE=" sh " ./configure "
86 "--prefix=" #$output)
87 "VERBOSE=1"))
88 #:phases #~(modify-phases %standard-phases
89 (delete 'configure)
90 (add-before 'build 'adjust-Makefile
91 (lambda _
92 ;; It's best to source a script via its absolute path,
93 ;; otherwise it's looked from PATH and fails for POSIX
94 ;; shells, such as our Bash-provided 'sh' (see:
95 ;; https://github.com/ArcticaProject/nx-libs/issues/1071).
96 (substitute* "Makefile"
97 (("\\. replace.sh")
98 ". ./replace.sh"))))
99 (add-after 'install 'wrap-nxdialog
100 (lambda* (#:key inputs #:allow-other-keys)
101 (wrap-program (string-append #$output "/bin/nxdialog")
102 `("GUIX_PYTHONPATH" =
103 (,(getenv "GUIX_PYTHONPATH")))
104 ;; Ensure GObject Introspection typelibs are found.
105 `("GI_TYPELIB_PATH" ":" =
106 (,(getenv "GI_TYPELIB_PATH")))))))))
107 (native-inputs
108 (list autoconf
109 automake
110 bash-minimal ;for wrap-program
111 font-util
112 gccmakedep
113 imake
114 libtool
115 perl
116 pkg-config
117 quilt
118 which))
119 (inputs
120 (list gtk+
121 libjpeg-turbo
122 libtirpc
123 libxcomposite
124 libxdamage
125 libxext
126 libxfont
127 libxinerama
128 libxml2
129 libxpm
130 libxrandr
131 libxtst
132 pixman
133 python-pygobject
134 python-wrapper
135 xkbcomp))
136 (propagated-inputs
137 (list libpng)) ;in Requires of nxcomp.pc
138 (synopsis "NX X11 protocol compression libraries")
139 (description "NX is a software suite which implements very efficient
140compression of the X11 protocol. This increases performance when using X
141applications over a network, especially a slow one. This package provides the
142following libraries:
143@table @code
144@item NX_X11
145NX's modified X Window System (X11) library
146@item Xcomp
147NX differential compression library for X11
148@item Xcompshad
149Session shadowing library
150@end table
151
152The following commands are also provided:
153
154@table @command
155@item nxagent
156Agent providing NX transport of X sessions
157@item nxproxy
158The NX proxy (client) binary
159@item nxdialog
160Helper script
161@end table")
162 (home-page "https://github.com/ArcticaProject/nx-libs")
163 (license license:gpl2)))
164
165(define-public x2goclient
166 (package
167 (name "x2goclient")
168 (version "4.1.2.3")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (string-append
173 "https://code.x2go.org/releases/source/x2goclient/x2goclient-"
174 version ".tar.gz"))
175 (sha256
176 (base32 "0g6aba8kpsixq4486a8mga945lp31y0mzwa2krs5qqiiip3v72xb"))
177 (patches (search-patches "x2goclient-fix-makefile.patch"))))
178 (build-system gnu-build-system)
179 (arguments
180 (list
181 #:tests? #f ;no test suite
182 #:make-flags
183 #~(list (string-append "SHELL="
184 (search-input-file %build-inputs "bin/bash"))
185 "QT_VERSION=5"
186 "INSTALL_DIR=install -d -m 755"
187 "INSTALL_FILE=install -m 644"
188 "INSTALL_PROGRAM=install -m 755"
189 (string-append "PREFIX=" #$output)
190 (string-append "ETCDIR=" #$output "/etc"))
191 #:phases
192 #~(modify-phases %standard-phases
193 (delete 'configure)
194 (add-before 'build 'patch-paths
195 (lambda* (#:key inputs #:allow-other-keys)
196 (substitute* "src/onmainwindow.cpp"
197 (("/usr/sbin/sshd")
198 (search-input-file inputs "sbin/sshd"))))))))
199 (native-inputs
200 (list man2html
201 pkg-config
202 qtbase-5
203 qttools-5))
204 (inputs
205 (list cups
206 libssh
207 libxpm
208 nx-libs
209 openldap
210 openssh
211 pulseaudio
212 qtbase-5
213 qtx11extras
214 qtsvg-5))
215 (synopsis "Remote desktop and application solution")
216 (description
217 "X2Go enables you to access a graphical desktop of a computer via
218SSH (Secure Shell). This package provides the X2Go Client, which can connect
219to the X2Go Server. Basic features of X2Go include:
220@itemize
221@item
222Graphical remote desktop that works well over both low bandwidth and high
223bandwidth connections
224@item
225The ability to disconnect and reconnect to a session, even from another
226client
227@item
228Support for sound
229@item
230Support for as many simultaneous users as the computer's resources will
231allow
232@item
233Traffic is securely tunneled over SSH
234@item
235File sharing from client to server
236@item
237Printer sharing from client to server
238@item
239Easily select from multiple desktop environments (e.g., MATE, GNOME, KDE)
240@item
241Remote support possible via desktop sharing
242@item
243The ability to access single applications by specifying the name of the
244desired executable in the client configuration or selecting one of the
245pre-defined common applications.
246@end itemize")
247 (home-page "https://wiki.x2go.org/doku.php")
248 (license license:gpl2)))