gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / wget.scm
CommitLineData
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>
2213d00f 4;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
afc43823 5;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
57ea4dfc 6;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8a6898b6 7;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
da7b042d 8;;;
233e7676 9;;; This file is part of GNU Guix.
da7b042d 10;;;
233e7676 11;;; GNU Guix is free software; you can redistribute it and/or modify it
da7b042d
NK
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
233e7676 16;;; GNU Guix is distributed in the hope that it will be useful, but
da7b042d
NK
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
233e7676 22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
da7b042d 23
1ffa7090 24(define-module (gnu packages wget)
7fb74221 25 #:use-module ((guix licenses) #:prefix license:)
c84c8f66 26 #:use-module (gnu packages)
afc43823 27 #:use-module (gnu packages base)
6b88912e 28 #:use-module (gnu packages compression)
afc43823 29 #:use-module (gnu packages documentation)
afc43823 30 #:use-module (gnu packages gnunet)
78249ebf 31 #:use-module (gnu packages gnupg)
fb7bdb43 32 #:use-module (gnu packages libidn)
afc43823 33 #:use-module (gnu packages pcre)
e3873113 34 #:use-module (gnu packages perl)
6b9540bc 35 #:use-module (gnu packages pkg-config)
e3873113 36 #:use-module (gnu packages python)
a7fd7b68 37 #:use-module (gnu packages tls)
e3873113 38 #:use-module (gnu packages web)
08b00d38 39 #:use-module (gnu packages xdisorg)
da7b042d
NK
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix build-system gnu))
43
44(define-public wget
45 (package
46 (name "wget")
25cb591c 47 (version "1.20.3")
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
25cb591c 55 "1frajd86ds8vz2hprq30wq8ya89z9dcxnwm8nwk12bbc47l7qq39"))))
da7b042d
NK
56 (build-system gnu-build-system)
57 (inputs
fb7bdb43 58 `(("gnutls" ,gnutls)
dd2c73f6 59 ("libidn2" ,libidn2)
8a6898b6 60 ("libpsl" ,libpsl)))
b5d4a811 61 (native-inputs
8a6898b6
JN
62 `(("lzip" ,lzip)
63 ("pkg-config" ,pkg-config)
6b9540bc 64 ("perl" ,perl)
fb7bdb43
EB
65 ("python" ,python) ;for testenv suite
66 ("perl-http-daemon" ,perl-http-daemon)
67 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
38eefbb1 68 (home-page "https://www.gnu.org/software/wget/")
f50d2669 69 (synopsis "Non-interactive command-line utility for downloading files")
da7b042d 70 (description
79c311b8 71 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
e881752c 72HTTPS and FTP protocols. It can resume interrupted downloads, use file name
a22dc0c4
LC
73wild cards, supports proxies and cookies, and it can convert absolute links
74in downloaded documents to relative links.")
7fb74221 75 (license license:gpl3+))) ; some files are under GPLv2+
22486fbe
EF
76
77(define-public wgetpaste
78 (package
79 (name "wgetpaste")
7b88396f 80 (version "2.30")
22486fbe
EF
81 (source
82 (origin
83 (method url-fetch)
1b075501 84 (uri (string-append "https://wgetpaste.zlin.dk/wgetpaste-"
22486fbe
EF
85 version ".tar.bz2"))
86 (sha256
30714da0
TGR
87 (base32 "14k5i6j6f34hcf9gdb9cnvfwscn0ys2dgd73ci421wj9zzqkbv73"))
88 (patches (search-patches "wgetpaste-update-bpaste.patch"))))
22486fbe
EF
89 (build-system gnu-build-system)
90 (arguments
710f0277 91 `(#:modules ((guix build gnu-build-system)
c8e214e8
TGR
92 (guix build utils)
93 (srfi srfi-1))
94 #:phases
22486fbe
EF
95 (modify-phases %standard-phases
96 (delete 'configure)
97 (delete 'build)
57ea4dfc 98 (add-after 'unpack 'change-unfriendly-default
23499949
EF
99 (lambda _
100 (substitute* "wgetpaste"
57ea4dfc
TGR
101 ;; dpaste blocks Tor users. Use a better default.
102 (("DEFAULT_SERVICE:-dpaste")
103 "DEFAULT_SERVICE-bpaste"))
23499949 104 #t))
22486fbe
EF
105 (replace 'install
106 (lambda* (#:key outputs #:allow-other-keys)
107 (let* ((out (assoc-ref outputs "out"))
108 (bin (string-append out "/bin"))
710f0277
EF
109 (zsh (string-append out "/share/zsh/site-functions"))
110 (doc (string-append out "/share/doc/" ,name "-" ,version)))
22486fbe 111 (install-file "wgetpaste" bin)
4d3990c9 112 (install-file "_wgetpaste" zsh)
710f0277 113 (install-file "LICENSE" doc)
c8e214e8
TGR
114 #t)))
115 (add-after 'install 'wrap-program
116 ;; /bin/wgetpaste prides itself on relying only on the following
117 ;; inputs, and doesn't need to execute arbitrary commands, so
118 ;; override PATH completely to detect any new dependencies early.
119 (lambda* (#:key outputs #:allow-other-keys)
120 (let ((out (assoc-ref outputs "out")))
121 (wrap-program (string-append out "/bin/wgetpaste")
122 `("PATH" ":" =
123 ,(delete-duplicates
124 (map (lambda (command) (dirname (which command)))
125 (list "bash" "mktemp" "sed" "sort" "tee" "tr"
08b00d38 126 "wget" "xclip")))))
4d3990c9 127 #t))))
7342923d
TGR
128 #:tests? #f)) ; no test target
129 (inputs
08b00d38
EF
130 `(("wget" ,wget)
131 ("xclip" ,xclip)))
1b075501 132 (home-page "https://wgetpaste.zlin.dk/")
22486fbe
EF
133 (synopsis "Script that automates pasting to a number of pastebin services")
134 (description
135 "@code{wgetpaste} is an extremely simple command-line interface to various
136online pastebin services.")
6610c518 137 (license license:expat)))
afc43823
RH
138
139(define-public wget2
140 (package
141 (name "wget2")
78249ebf 142 (version "1.99.2")
afc43823 143 (source
f5e08f17 144 (origin
78249ebf
EF
145 (method url-fetch)
146 (uri (string-append "mirror://gnu/wget/wget2-" version ".tar.gz"))
f5e08f17
EF
147 (sha256
148 (base32
78249ebf 149 "0qv55f4bablrlhc8bnic8g3mkk1kq44c4cphrk5jmv92z9aqzi6b"))))
afc43823
RH
150 (build-system gnu-build-system)
151 (arguments
f5e08f17
EF
152 `(#:phases
153 (modify-phases %standard-phases
78249ebf 154 (add-after 'unpack 'skip-network-tests
f5e08f17 155 (lambda _
78249ebf
EF
156 (substitute* "tests/Makefile.in"
157 (("test-gpg-verify-no-file\\$\\(EXEEXT)") "")
158 (("test-gpg-valid\\$\\(EXEEXT)") "")
159 (("test-gpg-styles\\$\\(EXEEXT)") ""))
160 #t)))
161 #:configure-flags '("--enable-static=no")))
f5e08f17 162 (inputs
78249ebf
EF
163 `(("bzip2" ,bzip2)
164 ("gnutls" ,gnutls/dane)
165 ("gpgme" ,gpgme)
f5e08f17
EF
166 ("libiconv" ,libiconv)
167 ("libidn2" ,libidn2)
168 ("libmicrohttpd" ,libmicrohttpd)
169 ("libpsl" ,libpsl)
78249ebf
EF
170 ("pcre2" ,pcre2)
171 ("zlib" ,zlib)))
afc43823 172 ;; TODO: Add libbrotlidec, libnghttp2.
f5e08f17 173 (native-inputs
78249ebf 174 `(("pkg-config" ,pkg-config)))
4b1ba80c 175 (home-page "https://gitlab.com/gnuwget/wget2")
afc43823
RH
176 (synopsis "Successor of GNU Wget")
177 (description "GNU Wget2 is the successor of GNU Wget, a file and recursive
178website downloader. Designed and written from scratch it wraps around libwget,
179that provides the basic functions needed by a web client.")
2213d00f 180 (properties '((ftp-directory . "/gnu/wget")))
7fb74221 181 (license (list license:gpl3+ license:lgpl3+))))