1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
6 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages wget)
24 #:use-module (guix licenses)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages autotools)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages documentation)
30 #:use-module (gnu packages flex)
31 #:use-module (gnu packages gettext)
32 #:use-module (gnu packages gnunet)
33 #:use-module (gnu packages libidn)
34 #:use-module (gnu packages pcre)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages tls)
39 #:use-module (gnu packages web)
40 #:use-module (gnu packages xdisorg)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
44 #:use-module (guix build-system gnu))
53 (uri (string-append "mirror://gnu/wget/wget-"
57 "1frajd86ds8vz2hprq30wq8ya89z9dcxnwm8nwk12bbc47l7qq39"))))
58 (build-system gnu-build-system)
65 `(("pkg-config" ,pkg-config)
67 ("python" ,python) ;for testenv suite
68 ("perl-http-daemon" ,perl-http-daemon)
69 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
70 (home-page "https://www.gnu.org/software/wget/")
71 (synopsis "Non-interactive command-line utility for downloading files")
73 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
74 HTTPS and FTP protocols. It can resume interrupted downloads, use file name
75 wild cards, supports proxies and cookies, and it can convert absolute links
76 in downloaded documents to relative links.")
77 (license gpl3+))) ; some files are under GPLv2+
79 (define-public wgetpaste
86 (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
90 "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
91 (build-system gnu-build-system)
93 '(#:modules ((guix build gnu-build-system)
97 (modify-phases %standard-phases
100 (add-after 'unpack 'remove-dead-paste-site
101 ;; This phase is adaped from the following patch:
102 ;; https://gitweb.gentoo.org/repo/gentoo.git/tree/app-text/wgetpaste/files/wgetpaste-remove-dead.patch
104 (substitute* "wgetpaste"
105 ((" poundpython\"") "\"")
106 (("-poundpython") "-bpaste")) ; dpaste blocks tor users
109 (lambda* (#:key outputs #:allow-other-keys)
110 (let* ((out (assoc-ref outputs "out"))
111 (bin (string-append out "/bin"))
112 (zsh (string-append out "/share/zsh/site-functions")))
113 (install-file "wgetpaste" bin)
114 (install-file "_wgetpaste" zsh)
116 (add-after 'install 'wrap-program
117 ;; /bin/wgetpaste prides itself on relying only on the following
118 ;; inputs, and doesn't need to execute arbitrary commands, so
119 ;; override PATH completely to detect any new dependencies early.
120 (lambda* (#:key outputs #:allow-other-keys)
121 (let ((out (assoc-ref outputs "out")))
122 (wrap-program (string-append out "/bin/wgetpaste")
125 (map (lambda (command) (dirname (which command)))
126 (list "bash" "mktemp" "sed" "sort" "tee" "tr"
129 #:tests? #f)) ; no test target
133 (home-page "http://wgetpaste.zlin.dk/")
134 (synopsis "Script that automates pasting to a number of pastebin services")
136 "@code{wgetpaste} is an extremely simple command-line interface to various
137 online pastebin services.")
138 (license public-domain)))
148 (url "https://gitlab.com/gnuwget/wget2.git")
149 (commit (string-append name "-" version))
150 (recursive? #t))) ;; Needed for 'gnulib' git submodule.
151 (file-name (string-append name "-" version "-checkout"))
154 "15wxsnjhc6bzk7f60i1djmsarh1w31gwi5h2gh9k19ncwypfj5dm"))))
155 (build-system gnu-build-system)
158 (modify-phases %standard-phases
159 (add-after 'unpack 'skip-network-test
161 (substitute* "tests/Makefile.am"
162 (("test-auth-digest\\$\\(EXEEXT)") ""))
166 ;; Make sure all the files are writable so that ./bootstrap
168 (for-each (lambda (file)
171 (patch-shebang "./gnulib/gnulib-tool.py")
172 ;; Remove unnecessary inputs from bootstrap.conf
173 (substitute* "bootstrap.conf"
178 (invoke "sh" "./bootstrap"
179 "--gnulib-srcdir=gnulib"
182 `(("gnutls" ,gnutls/dane)
183 ("libiconv" ,libiconv)
185 ("libmicrohttpd" ,libmicrohttpd)
188 ;; TODO: Add libbrotlidec, libnghttp2.
190 `(("autoconf" ,autoconf)
191 ("automake" ,automake)
193 ("gettext" ,gettext-minimal)
195 ("pkg-config" ,pkg-config)
196 ("python" ,python-2)))
197 (home-page "https://gitlab.com/gnuwget/wget2")
198 (synopsis "Successor of GNU Wget")
199 (description "GNU Wget2 is the successor of GNU Wget, a file and recursive
200 website downloader. Designed and written from scratch it wraps around libwget,
201 that provides the basic functions needed by a web client.")
202 (license (list gpl3+ lgpl3+))))