projects/guix·blob javascript-team · refs

409 lines · 15.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2015, 2018, 2021, 2021 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015 Andreas Enge <[email protected]>
4;;; Copyright © 2015 Mark H Weaver <[email protected]>
5;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2017 Rene Saavedra <[email protected]>
7;;; Copyright © 2021 David Larsson <[email protected]>
8;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
9;;; Copyright © 2022 Jai Vetrivelan <[email protected]>
10;;; Copyright © 2026 Artyom V. Poptsov <[email protected]>
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages ftp)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages crypto)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gperf)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages libidn)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages nettle)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages readline)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages tls)
49 #:use-module (gnu packages wxwidgets)
50 #:use-module (gnu packages xml)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix download)
53 #:use-module (guix gexp)
54 #:use-module (guix git-download)
55 #:use-module ((guix licenses) #:prefix license:)
56 #:use-module (guix packages)
57 #:use-module (guix svn-download)
58 #:use-module (guix utils))
59
60(define-public lftp
61 (package
62 (name "lftp")
63 (version "4.9.3")
64 (source (origin
65 (method git-fetch)
66 (uri (git-reference
67 (url "https://github.com/lavv17/lftp")
68 (commit (string-append "v" version))))
69 (file-name (git-file-name name version))
70 (sha256
71 (base32
72 "1hzy2g426az6y5gh2pzkz8bd0z744ibnvs72iqwy902y7lhdil0f"))))
73 (build-system gnu-build-system)
74 (native-inputs
75 `(("autoconf" ,autoconf-2.71)
76 ("automake" ,automake)
77 ("gettext-minimal" ,gettext-minimal)
78 ;; required by gnulib to fix parse-datetime.c compilation error
79 ("bison" ,bison)
80 ("gnulib"
81 ,(let ((commit "949989513e631b61196f11fd8d647d4dc77d7f40"))
82 (origin
83 (method git-fetch)
84 (uri (git-reference
85 (url "git://git.savannah.gnu.org/gnulib.git")
86 (commit commit)))
87 (sha256
88 (base32 "0jk336yxfzldi0nsni0q3cxa7lqxb8lzmiisrr594v8cfvcprqn9"))
89 (file-name (git-file-name "gnulib" commit)))))
90 ("gperf" ,gperf)
91 ("libtool" ,libtool)
92 ("pkg-config" ,pkg-config)))
93 (inputs
94 (list zlib readline gnutls))
95 (arguments
96 (list #:phases
97 #~(modify-phases %standard-phases
98 (add-after 'unpack 'unpack-gnulib
99 (lambda _
100 (copy-recursively #$(this-package-native-input "gnulib")
101 "gnulib")))
102 (delete 'bootstrap)
103 (add-after 'patch-source-shebangs 'bootstrap
104 (lambda _
105 (invoke "sh" "bootstrap"
106 "--no-git"
107 "--gnulib-srcdir=gnulib")))
108 ;; Disable tests that require network access, which is most of them.
109 (add-before 'check 'disable-impure-tests
110 (lambda _
111 (substitute* "tests/Makefile"
112 (("(ftp-cls-l|ftp-list|http-get)\\$\\(EXEEXT\\)") "")
113 (("lftp-https-get ") "")))))
114 #:configure-flags
115 #~(list (string-append "--with-readline="
116 #$(this-package-input "readline")))))
117 (home-page "https://lftp.yar.ru/")
118 (synopsis "Command-line file transfer program")
119 (description
120 "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
121supporting a number of network protocols. Like Bash, it has job control and
122uses the Readline library for input. It has bookmarks, a built-in mirror
123command, and can transfer several files in parallel. It was designed with
124reliability in mind.")
125 (license license:gpl3+)))
126
127(define-public ncftp
128 (package
129 (name "ncftp")
130 (version "3.3.0")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append "https://www.ncftp.com/public_ftp/ncftp/ncftp-"
134 version "-src.tar.gz"))
135 (sha256
136 (base32
137 "11k375kcimd8fxb6zxdkqy2qfs927mpnvi21iqncibxdqa2gh83r"))
138 (patches
139 (search-patches
140 "ncftp-reproducible.patch"
141 "ncftp-paths.patch"))
142 (modules '((guix build utils)))
143 (snippet
144 '(begin
145 ;; Use the right 'rm' and 'ls'.
146 (substitute* (cons "configure"
147 (find-files "."
148 "^(Makefile\\.in|.*\\.sh)$"))
149 (("/bin/(rm|ls)" _ command)
150 command))
151
152 ;; This is free software, avoid any confusion.
153 (substitute* (find-files "." "\\.c$")
154 (("a freeware program")
155 "free software"))
156 #t))))
157 (properties
158 `((release-monitoring-url . "https://www.ncftp.com/download/")))
159 (build-system gnu-build-system)
160 (arguments
161 '(#:phases
162 (modify-phases %standard-phases
163 (replace 'configure
164 (lambda* (#:key outputs #:allow-other-keys)
165 ;; This is an old 'configure' script that doesn't
166 ;; understand variables passed as arguments.
167 (let ((out (assoc-ref outputs "out")))
168 (setenv "CONFIG_SHELL" (which "sh"))
169 (setenv "SHELL" (which "sh"))
170 (setenv "CFLAGS" "-fcommon")
171 (invoke "./configure"
172 (string-append "--prefix=" out))))))
173 #:tests? #f)) ;there are no tests
174 (inputs (list ncurses))
175 (home-page "https://www.ncftp.com/ncftp/")
176 (synopsis "Command-line File Transfer Protocol (FTP) client")
177 (description
178 "NcFTP Client (or just NcFTP) is a set of command-line programs to access
179File Transfer Protocol (FTP) servers. This includes @code{ncftp}, an interactive
180FTP browser, as well as non-interactive commands such as @code{ncftpput} and
181@code{ncftpget}.")
182 (license license:clarified-artistic)))
183
184(define-public proftpd
185 (package
186 (name "proftpd")
187 (version "1.3.9d")
188 (source
189 (origin
190 (method git-fetch)
191 (uri (git-reference
192 (url "https://github.com/proftpd/proftpd")
193 (commit (string-append "v" version))))
194 (file-name (git-file-name name version))
195 ;; TODO: regenerate configure script
196 (patches
197 (search-patches "proftpd-dont-create-localstatedir.patch"
198 "proftpd-dont-install-user.patch"))
199 (sha256
200 (base32 "1z8j2d4zjash5p7dnni3ragri49l77k7aannrd5lgybwkbpknhbv"))))
201 (build-system gnu-build-system)
202 (arguments
203 (list
204 #:configure-flags
205 #~(list "--enable-openssl"
206 "--localstatedir=/var"
207 "--with-modules=mod_sftp")
208 #:phases
209 #~(modify-phases %standard-phases
210 (add-after 'install 'install-samples
211 (lambda _
212 (let ((samples-dir (string-append #$output "/share/doc/proftpd/sample-configurations")))
213 (mkdir-p samples-dir)
214 (copy-recursively "sample-configurations" samples-dir)))))))
215 (inputs
216 (list libcap
217 libsodium
218 libxcrypt
219 linux-pam
220 ncurses
221 openssl
222 perl
223 zlib))
224 (home-page "http://proftpd.org")
225 (synopsis "Highly configurable FTP server")
226 (description
227 "ProFTPD is a highly configurable FTP daemon for Unix and Unix-like
228operating systems.")
229 ;; TODO: clarify the licenses of individual files.
230 (license license:gpl2+)))
231
232(define-public weex
233 (package
234 (name "weex")
235 (version "2.8.3")
236 (source
237 (origin
238 (method url-fetch)
239 (uri
240 (string-append "mirror://sourceforge/weex/weex/"
241 "/weex_" version ".tar.gz"))
242 (sha256
243 (base32
244 "00qnw5q2i0xa2a51jp5737r3jx959rl1gbi9flpwin8s8ymqd9bj"))))
245 (build-system gnu-build-system)
246 (arguments
247 (list
248 #:configure-flags #~(list "--disable-dependency-tracking")
249 #:phases
250 #~(modify-phases %standard-phases
251 (add-after 'unpack 'patch-/bin/sh
252 (lambda* (#:key inputs #:allow-other-keys)
253 (substitute* "po/Makefile.in.in"
254 (("/bin/sh")
255 (search-input-file inputs "/bin/sh")))
256 (substitute* "intl/Makefile.in"
257 (("/bin/sh")
258 (search-input-file inputs "/bin/sh"))))))))
259 (native-inputs
260 (list automake autoconf gettext-minimal))
261 (home-page "https://weex.sourceforge.net/")
262 (synopsis "Non-interactive client for FTP synchronization")
263 (description
264 "Weex is a utility designed to automate the task of remotely
265maintaining a web page or other FTP archive. It synchronizes a set of
266local files to a remote server by performing uploads and remote deletes
267as required.")
268 (license license:gpl2+)))
269
270(define-public libfilezilla
271 (let ((revision 11287))
272 (package
273 (name "libfilezilla")
274 (version "0.51.0")
275 (source
276 (origin
277 (method svn-fetch)
278 (uri (svn-reference
279 (url "https://svn.filezilla-project.org/svn/libfilezilla/trunk")
280 (revision revision)))
281 (file-name (string-append name "-" version "-" (number->string revision)))
282 (sha256
283 (base32 "1ylapyyi1lj41w3c73dzq2r43vwmmk820z2gd0qfs3sdi9wb95z1"))))
284 (build-system gnu-build-system)
285 (arguments
286 `(#:configure-flags (list "--disable-static")))
287 (native-inputs
288 (list cppunit
289 gettext-minimal
290 libxcrypt
291 pkg-config
292 autoconf
293 automake
294 libtool))
295 (inputs
296 (list gnutls nettle))
297 (home-page "https://lib.filezilla-project.org")
298 (synopsis "Cross-platform C++ library used by Filezilla client")
299 (description
300 "This package provides some basic functionality to build high-performing,
301platform-independent programs.
302
303Some of the highlights include:
304@itemize
305@item
306A type-safe, multi-threaded event system that's simple to use yet efficient.
307@item
308Timers for periodic events.
309@item
310A @code{datetime} class that not only tracks timestamp but also their accuracy,
311which simplifies dealing with timestamps originating from different sources.
312@item
313Simple process handling for spawning child processes with redirected input and
314output.
315@end itemize\n")
316 (license license:gpl2+))))
317
318(define-public filezilla
319 (let ((revision 11290))
320 (package
321 (name "filezilla")
322 (version "3.69.2")
323 (source
324 (origin
325 (method svn-fetch)
326 (uri (svn-reference
327 (url "https://svn.filezilla-project.org/svn/FileZilla3/trunk")
328 (revision revision)))
329 (sha256
330 (base32 "0pz8fhzgm4kyax64bkkpsq3p1lcypjacr05bvk4wxp80lfqiv32k"))))
331 (build-system gnu-build-system)
332 (arguments
333 ;; Don't let filezilla phone home to check for updates.
334 '(#:configure-flags '("--disable-autoupdatecheck")))
335 (native-inputs
336 (list autoconf automake cppunit gettext-minimal libtool pkg-config xdg-utils))
337 (inputs
338 (list boost
339 dbus
340 gnutls
341 gtk+
342 libfilezilla
343 libidn
344 nettle
345 pugixml
346 sqlite
347 wxwidgets))
348 (home-page "https://filezilla-project.org")
349 (synopsis "Full-featured graphical FTP/FTPS/SFTP client")
350 (description
351 "Filezilla client supports FTP, FTP over SSL/TLS (FTPS),
352SSH File Transfer Protocol (SFTP), HTTP/1.1, SOCKS5, FTP-Proxy, IPv6
353and others features such as bookmarks, drag and drop, filename filters,
354directory comparison and more.")
355 (license license:gpl2+)
356 (properties '((upstream-name . "FileZilla"))))))
357
358(define-public vsftpd
359 (package
360 (name "vsftpd")
361 (version "3.0.5")
362 (source
363 (origin
364 (method url-fetch)
365 (uri (string-append "https://security.appspot.com/downloads/"
366 "vsftpd-" version ".tar.gz"))
367 (sha256
368 (base32 "1lwipiq8q9qzvwv6f418fbvagpz0p6v0jjplkvcsc2sb8np05di6"))))
369 (build-system gnu-build-system)
370 (arguments
371 `(#:make-flags
372 (list (string-append "CC=" ,(cc-for-target))
373 ;; Work around, e.g., “ssl.c:149:7: error: ‘EC_KEY_free’ is
374 ;; deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]”
375 "CFLAGS=-Wno-deprecated-declarations"
376 ;; vsf_findlibs.sh looks only for hard-coded {/usr,}/lib file names
377 ;; that will never exist on Guix. Manage libraries ourselves.
378 "LDFLAGS=-lcap -lpam"
379 "INSTALL=install -D")
380 #:tests? #f ; no test suite
381 #:phases
382 (modify-phases %standard-phases
383 (add-after 'unpack 'build-SSL
384 (lambda _
385 (substitute* "builddefs.h"
386 (("#undef (VSF_BUILD_SSL)" _ symbol)
387 (string-append "#define " symbol)))))
388 (add-after 'unpack 'append-make-flags
389 (lambda _
390 (substitute* "Makefile"
391 (("(CFLAGS|LDFLAGS)[[:blank:]]*=" _ variable)
392 (format #f "UPSTREAM_~a +=" variable))
393 (("\\$\\((CFLAGS|LDFLAGS)\\)" _ variable)
394 (format #f "$(UPSTREAM_~a) $(~@*~a)" variable)))))
395 (add-after 'unpack 'patch-installation-directory
396 (lambda* (#:key outputs #:allow-other-keys)
397 (substitute* "Makefile"
398 (("/usr") (assoc-ref outputs "out")))))
399 (delete 'configure)))) ; no configure script
400 (inputs
401 (list libcap linux-pam openssl))
402 (synopsis "Small FTP server with a focus on security")
403 (description
404 "The Very Secure File Transfer Protocol Daemon or @command{vsftpd} is a
405server that listens on a TCP socket for clients and gives them access to local
406files via @acronym{FTP, the File Transfer Protocol}. Security is a goal; not a
407guarantee.")
408 (home-page "https://security.appspot.com/vsftpd.html")
409 (license license:gpl2))) ; with OpenSSL exception