Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
7f098083 | 3 | ;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> |
80042ae9 | 4 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
afc43823 | 5 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
da7b042d | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
da7b042d | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
da7b042d NK |
10 | ;;; under the terms of the GNU General Public License as published by |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
da7b042d NK |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
da7b042d | 21 | |
1ffa7090 | 22 | (define-module (gnu packages wget) |
4a44e743 | 23 | #:use-module (guix licenses) |
c84c8f66 | 24 | #:use-module (gnu packages) |
afc43823 RH |
25 | #:use-module (gnu packages autotools) |
26 | #:use-module (gnu packages base) | |
6b88912e | 27 | #:use-module (gnu packages compression) |
afc43823 RH |
28 | #:use-module (gnu packages documentation) |
29 | #:use-module (gnu packages flex) | |
30 | #:use-module (gnu packages gettext) | |
31 | #:use-module (gnu packages gnunet) | |
fb7bdb43 EB |
32 | #:use-module (gnu packages libidn) |
33 | #:use-module (gnu packages python) | |
1ffa7090 | 34 | #:use-module (gnu packages perl) |
fb7bdb43 | 35 | #:use-module (gnu packages web) |
afc43823 | 36 | #:use-module (gnu packages pcre) |
6b9540bc | 37 | #:use-module (gnu packages pkg-config) |
a7fd7b68 | 38 | #:use-module (gnu packages tls) |
da7b042d NK |
39 | #:use-module (guix packages) |
40 | #:use-module (guix download) | |
afc43823 | 41 | #:use-module (guix git-download) |
da7b042d NK |
42 | #:use-module (guix build-system gnu)) |
43 | ||
44 | (define-public wget | |
45 | (package | |
46 | (name "wget") | |
0e5dbc47 | 47 | (version "1.19.4") |
da7b042d NK |
48 | (source |
49 | (origin | |
50 | (method url-fetch) | |
51 | (uri (string-append "mirror://gnu/wget/wget-" | |
6b88912e | 52 | version ".tar.lz")) |
da7b042d NK |
53 | (sha256 |
54 | (base32 | |
0e5dbc47 | 55 | "16jmcqcasx3q9k4azssryli9qyxfq0sfijw998g8zp58cnwzzh1g")))) |
da7b042d | 56 | (build-system gnu-build-system) |
7f098083 LC |
57 | (arguments |
58 | '(#:phases (modify-phases %standard-phases | |
59 | (add-before 'check 'disable-https-tests | |
60 | (lambda _ | |
61 | ;; XXX: Skip TLS tests, which fail with "The | |
3512bd4d LC |
62 | ;; certificate's owner does not match hostname" as |
63 | ;; reported at: | |
64 | ;; <https://lists.gnu.org/archive/html/bug-wget/2017-07/msg00012.html>. | |
65 | ;; The problem appears to be due to a change in GnuTLS | |
66 | ;; 3.5.12, whereby 'gnutls_x509_crt_check_hostname2' no | |
67 | ;; longer matches IP address against the 'CN' or | |
68 | ;; 'DNSname' fields of certificates. | |
7f098083 LC |
69 | (substitute* "testenv/Makefile" |
70 | (("SSL_TESTS=1") "")) | |
71 | #t))))) | |
da7b042d | 72 | (inputs |
fb7bdb43 | 73 | `(("gnutls" ,gnutls) |
dd2c73f6 | 74 | ("libidn2" ,libidn2) |
6b88912e MB |
75 | ("libpsl" ,libpsl) |
76 | ("lzip" ,lzip))) | |
b5d4a811 | 77 | (native-inputs |
6b9540bc LC |
78 | `(("pkg-config" ,pkg-config) |
79 | ("perl" ,perl) | |
fb7bdb43 EB |
80 | ("python" ,python) ;for testenv suite |
81 | ("perl-http-daemon" ,perl-http-daemon) | |
82 | ("perl-io-socket-ssl" ,perl-io-socket-ssl))) | |
38eefbb1 | 83 | (home-page "https://www.gnu.org/software/wget/") |
f50d2669 | 84 | (synopsis "Non-interactive command-line utility for downloading files") |
da7b042d | 85 | (description |
79c311b8 | 86 | "GNU Wget is a non-interactive tool for fetching files using the HTTP, |
e881752c | 87 | HTTPS and FTP protocols. It can resume interrupted downloads, use file name |
a22dc0c4 LC |
88 | wild cards, supports proxies and cookies, and it can convert absolute links |
89 | in downloaded documents to relative links.") | |
4a44e743 | 90 | (license gpl3+))) ; some files are under GPLv2+ |
22486fbe EF |
91 | |
92 | (define-public wgetpaste | |
93 | (package | |
94 | (name "wgetpaste") | |
95 | (version "2.28") | |
96 | (source | |
97 | (origin | |
98 | (method url-fetch) | |
99 | (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-" | |
100 | version ".tar.bz2")) | |
101 | (sha256 | |
102 | (base32 | |
103 | "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak")))) | |
104 | (build-system gnu-build-system) | |
105 | (arguments | |
106 | '(#:phases | |
107 | (modify-phases %standard-phases | |
108 | (delete 'configure) | |
109 | (delete 'build) | |
110 | (replace 'install | |
111 | (lambda* (#:key outputs #:allow-other-keys) | |
112 | (let* ((out (assoc-ref outputs "out")) | |
113 | (bin (string-append out "/bin")) | |
114 | (zsh (string-append out "/share/zsh/site-functions"))) | |
115 | (install-file "wgetpaste" bin) | |
116 | (install-file "_wgetpaste" zsh))))) | |
117 | #:tests? #f)) ; no test target | |
118 | (home-page "http://wgetpaste.zlin.dk/") | |
119 | (synopsis "Script that automates pasting to a number of pastebin services") | |
120 | (description | |
121 | "@code{wgetpaste} is an extremely simple command-line interface to various | |
122 | online pastebin services.") | |
123 | (license public-domain))) | |
afc43823 RH |
124 | |
125 | (define-public wget2 | |
126 | (package | |
127 | (name "wget2") | |
128 | (version "1.0.0") | |
129 | (source | |
130 | (origin | |
131 | (method git-fetch) | |
132 | (uri (git-reference | |
4b1ba80c | 133 | (url "https://gitlab.com/gnuwget/wget2.git") |
afc43823 RH |
134 | (commit "b45709d3d21714135ce79df6abbdcb704684063d") |
135 | (recursive? #t))) ;; Needed for 'gnulib' git submodule. | |
136 | (file-name (string-append name "-" version "-checkout")) | |
137 | (sha256 | |
138 | (base32 | |
139 | "0ww84wwzmpyylkz8rnb6nk6f7x040132z81x52w7rjhk68p9mm24")))) | |
140 | (build-system gnu-build-system) | |
141 | (arguments | |
142 | `(#:phases (modify-phases %standard-phases | |
143 | (add-after 'unpack 'bootstrap | |
144 | (lambda _ | |
145 | ;; Make sure all the files are writable so that ./bootstrap | |
146 | ;; can proceed. | |
147 | (for-each (lambda (file) | |
148 | (chmod file #o755)) | |
149 | (find-files ".")) | |
150 | (substitute* "./gnulib/gnulib-tool.py" | |
151 | (("/usr/bin/python") (which "python3"))) | |
152 | (zero? (system* "sh" "./bootstrap" | |
153 | "--gnulib-srcdir=gnulib" | |
154 | "--no-git"))))))) | |
c695fb76 TGR |
155 | (inputs `(("autoconf" ,autoconf) |
156 | ("automake" ,automake) | |
157 | ("doxygen" ,doxygen) | |
158 | ("flex" ,flex) | |
159 | ("gettext" ,gettext-minimal) | |
160 | ("gnutls" ,gnutls/dane) | |
161 | ("libiconv" ,libiconv) | |
162 | ("libidn2" ,libidn2) | |
163 | ("libmicrohttpd" ,libmicrohttpd) | |
164 | ("libpsl" ,libpsl) | |
165 | ("libtool" ,libtool) | |
166 | ("pcre2" ,pcre2) | |
167 | ("python" ,python))) | |
afc43823 | 168 | ;; TODO: Add libbrotlidec, libnghttp2. |
c695fb76 | 169 | (native-inputs `(("pkg-config" ,pkg-config))) |
4b1ba80c | 170 | (home-page "https://gitlab.com/gnuwget/wget2") |
afc43823 RH |
171 | (synopsis "Successor of GNU Wget") |
172 | (description "GNU Wget2 is the successor of GNU Wget, a file and recursive | |
173 | website downloader. Designed and written from scratch it wraps around libwget, | |
174 | that provides the basic functions needed by a web client.") | |
175 | (license (list gpl3+ lgpl3+)))) |