Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
189be331 | 3 | ;;; Copyright © 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
f5e08f17 | 4 | ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> |
afc43823 | 5 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
4d3990c9 | 6 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
da7b042d | 7 | ;;; |
233e7676 | 8 | ;;; This file is part of GNU Guix. |
da7b042d | 9 | ;;; |
233e7676 | 10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
da7b042d NK |
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. | |
14 | ;;; | |
233e7676 | 15 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
da7b042d NK |
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. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
da7b042d | 22 | |
1ffa7090 | 23 | (define-module (gnu packages wget) |
4a44e743 | 24 | #:use-module (guix licenses) |
c84c8f66 | 25 | #:use-module (gnu packages) |
afc43823 RH |
26 | #:use-module (gnu packages autotools) |
27 | #:use-module (gnu packages base) | |
6b88912e | 28 | #:use-module (gnu packages compression) |
afc43823 RH |
29 | #:use-module (gnu packages documentation) |
30 | #:use-module (gnu packages flex) | |
31 | #:use-module (gnu packages gettext) | |
32 | #:use-module (gnu packages gnunet) | |
fb7bdb43 EB |
33 | #:use-module (gnu packages libidn) |
34 | #:use-module (gnu packages python) | |
1ffa7090 | 35 | #:use-module (gnu packages perl) |
fb7bdb43 | 36 | #:use-module (gnu packages web) |
afc43823 | 37 | #:use-module (gnu packages pcre) |
6b9540bc | 38 | #:use-module (gnu packages pkg-config) |
a7fd7b68 | 39 | #:use-module (gnu packages tls) |
da7b042d NK |
40 | #:use-module (guix packages) |
41 | #:use-module (guix download) | |
afc43823 | 42 | #:use-module (guix git-download) |
da7b042d NK |
43 | #:use-module (guix build-system gnu)) |
44 | ||
45 | (define-public wget | |
46 | (package | |
47 | (name "wget") | |
54d60962 | 48 | (version "1.20.1") |
da7b042d NK |
49 | (source |
50 | (origin | |
51 | (method url-fetch) | |
52 | (uri (string-append "mirror://gnu/wget/wget-" | |
6b88912e | 53 | version ".tar.lz")) |
da7b042d NK |
54 | (sha256 |
55 | (base32 | |
54d60962 | 56 | "0a29qsqxkk8145vkyy35q5a1wc7qzwx3qj3gmfrkmi9xs96yhqqg")))) |
da7b042d NK |
57 | (build-system gnu-build-system) |
58 | (inputs | |
fb7bdb43 | 59 | `(("gnutls" ,gnutls) |
dd2c73f6 | 60 | ("libidn2" ,libidn2) |
6b88912e MB |
61 | ("libpsl" ,libpsl) |
62 | ("lzip" ,lzip))) | |
b5d4a811 | 63 | (native-inputs |
6b9540bc LC |
64 | `(("pkg-config" ,pkg-config) |
65 | ("perl" ,perl) | |
fb7bdb43 EB |
66 | ("python" ,python) ;for testenv suite |
67 | ("perl-http-daemon" ,perl-http-daemon) | |
68 | ("perl-io-socket-ssl" ,perl-io-socket-ssl))) | |
38eefbb1 | 69 | (home-page "https://www.gnu.org/software/wget/") |
f50d2669 | 70 | (synopsis "Non-interactive command-line utility for downloading files") |
da7b042d | 71 | (description |
79c311b8 | 72 | "GNU Wget is a non-interactive tool for fetching files using the HTTP, |
e881752c | 73 | HTTPS and FTP protocols. It can resume interrupted downloads, use file name |
a22dc0c4 LC |
74 | wild cards, supports proxies and cookies, and it can convert absolute links |
75 | in downloaded documents to relative links.") | |
4a44e743 | 76 | (license gpl3+))) ; some files are under GPLv2+ |
22486fbe EF |
77 | |
78 | (define-public wgetpaste | |
79 | (package | |
80 | (name "wgetpaste") | |
81 | (version "2.28") | |
82 | (source | |
83 | (origin | |
84 | (method url-fetch) | |
85 | (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-" | |
86 | version ".tar.bz2")) | |
87 | (sha256 | |
88 | (base32 | |
89 | "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak")))) | |
90 | (build-system gnu-build-system) | |
91 | (arguments | |
c8e214e8 TGR |
92 | '(#:modules ((guix build gnu-build-system) |
93 | (guix build utils) | |
94 | (srfi srfi-1)) | |
95 | #:phases | |
22486fbe EF |
96 | (modify-phases %standard-phases |
97 | (delete 'configure) | |
98 | (delete 'build) | |
99 | (replace 'install | |
100 | (lambda* (#:key outputs #:allow-other-keys) | |
101 | (let* ((out (assoc-ref outputs "out")) | |
102 | (bin (string-append out "/bin")) | |
103 | (zsh (string-append out "/share/zsh/site-functions"))) | |
104 | (install-file "wgetpaste" bin) | |
4d3990c9 | 105 | (install-file "_wgetpaste" zsh) |
c8e214e8 TGR |
106 | #t))) |
107 | (add-after 'install 'wrap-program | |
108 | ;; /bin/wgetpaste prides itself on relying only on the following | |
109 | ;; inputs, and doesn't need to execute arbitrary commands, so | |
110 | ;; override PATH completely to detect any new dependencies early. | |
111 | (lambda* (#:key outputs #:allow-other-keys) | |
112 | (let ((out (assoc-ref outputs "out"))) | |
113 | (wrap-program (string-append out "/bin/wgetpaste") | |
114 | `("PATH" ":" = | |
115 | ,(delete-duplicates | |
116 | (map (lambda (command) (dirname (which command))) | |
117 | (list "bash" "mktemp" "sed" "sort" "tee" "tr" | |
118 | "wget"))))) | |
4d3990c9 | 119 | #t)))) |
7342923d TGR |
120 | #:tests? #f)) ; no test target |
121 | (inputs | |
122 | `(("wget" ,wget))) | |
22486fbe EF |
123 | (home-page "http://wgetpaste.zlin.dk/") |
124 | (synopsis "Script that automates pasting to a number of pastebin services") | |
125 | (description | |
126 | "@code{wgetpaste} is an extremely simple command-line interface to various | |
127 | online pastebin services.") | |
128 | (license public-domain))) | |
afc43823 RH |
129 | |
130 | (define-public wget2 | |
131 | (package | |
132 | (name "wget2") | |
f5e08f17 | 133 | (version "1.99.1") |
afc43823 | 134 | (source |
f5e08f17 EF |
135 | (origin |
136 | (method git-fetch) | |
137 | (uri (git-reference | |
138 | (url "https://gitlab.com/gnuwget/wget2.git") | |
139 | (commit (string-append name "-" version)) | |
140 | (recursive? #t))) ;; Needed for 'gnulib' git submodule. | |
141 | (file-name (string-append name "-" version "-checkout")) | |
142 | (sha256 | |
143 | (base32 | |
144 | "15wxsnjhc6bzk7f60i1djmsarh1w31gwi5h2gh9k19ncwypfj5dm")))) | |
afc43823 RH |
145 | (build-system gnu-build-system) |
146 | (arguments | |
f5e08f17 EF |
147 | `(#:phases |
148 | (modify-phases %standard-phases | |
149 | (add-after 'unpack 'skip-network-test | |
150 | (lambda _ | |
151 | (substitute* "tests/Makefile.am" | |
152 | (("test-auth-digest\\$\\(EXEEXT)") "")) | |
153 | #t)) | |
154 | (replace 'bootstrap | |
155 | (lambda _ | |
156 | ;; Make sure all the files are writable so that ./bootstrap | |
157 | ;; can proceed. | |
158 | (for-each (lambda (file) | |
159 | (chmod file #o755)) | |
160 | (find-files ".")) | |
161 | (patch-shebang "./gnulib/gnulib-tool.py") | |
162 | ;; Remove unnecessary inputs from bootstrap.conf | |
163 | (substitute* "bootstrap.conf" | |
164 | (("flex.*") "") | |
165 | (("makeinfo.*") "") | |
166 | (("lzip.*") "") | |
167 | (("rsync.*") "")) | |
168 | (invoke "sh" "./bootstrap" | |
169 | "--gnulib-srcdir=gnulib" | |
170 | "--no-git")))))) | |
171 | (inputs | |
172 | `(("gnutls" ,gnutls/dane) | |
173 | ("libiconv" ,libiconv) | |
174 | ("libidn2" ,libidn2) | |
175 | ("libmicrohttpd" ,libmicrohttpd) | |
176 | ("libpsl" ,libpsl) | |
177 | ("pcre2" ,pcre2))) | |
afc43823 | 178 | ;; TODO: Add libbrotlidec, libnghttp2. |
f5e08f17 EF |
179 | (native-inputs |
180 | `(("autoconf" ,autoconf) | |
181 | ("automake" ,automake) | |
182 | ("flex" ,flex) | |
183 | ("gettext" ,gettext-minimal) | |
184 | ("libtool" ,libtool) | |
185 | ("pkg-config" ,pkg-config) | |
186 | ("python" ,python-2))) | |
4b1ba80c | 187 | (home-page "https://gitlab.com/gnuwget/wget2") |
afc43823 RH |
188 | (synopsis "Successor of GNU Wget") |
189 | (description "GNU Wget2 is the successor of GNU Wget, a file and recursive | |
190 | website downloader. Designed and written from scratch it wraps around libwget, | |
191 | that provides the basic functions needed by a web client.") | |
192 | (license (list gpl3+ lgpl3+)))) |