projects/guix·blob ruby-team · refs

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