gnu: libsoup: Adjust to new GnuTLS certificate-check behavior.
[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>
7f098083 3;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
80042ae9 4;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
da7b042d 5;;;
233e7676 6;;; This file is part of GNU Guix.
da7b042d 7;;;
233e7676 8;;; GNU Guix is free software; you can redistribute it and/or modify it
da7b042d
NK
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
233e7676 13;;; GNU Guix is distributed in the hope that it will be useful, but
da7b042d
NK
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
233e7676 19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
da7b042d 20
1ffa7090 21(define-module (gnu packages wget)
4a44e743 22 #:use-module (guix licenses)
c84c8f66 23 #:use-module (gnu packages)
fb7bdb43
EB
24 #:use-module (gnu packages libidn)
25 #:use-module (gnu packages python)
1ffa7090 26 #:use-module (gnu packages perl)
fb7bdb43 27 #:use-module (gnu packages web)
6b9540bc 28 #:use-module (gnu packages pkg-config)
a7fd7b68 29 #:use-module (gnu packages tls)
da7b042d
NK
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix build-system gnu))
33
34(define-public wget
35 (package
36 (name "wget")
43f10b5e 37 (version "1.19.1")
da7b042d
NK
38 (source
39 (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/wget/wget-"
42 version ".tar.xz"))
80042ae9 43 (patches (search-patches "wget-CVE-2017-6508.patch"
7f098083
LC
44 "wget-fix-504-test-timeout.patch"
45 "wget-perl-5.26.patch"))
da7b042d
NK
46 (sha256
47 (base32
43f10b5e 48 "1ljcfhbkdsd0zjfm520rbl1ai62fc34i7c45sfj244l8f6b0p58c"))))
da7b042d 49 (build-system gnu-build-system)
7f098083
LC
50 (arguments
51 '(#:phases (modify-phases %standard-phases
52 (add-before 'check 'disable-https-tests
53 (lambda _
54 ;; XXX: Skip TLS tests, which fail with "The
55 ;; certificate's owner does not match hostname" for
56 ;; obscure reasons reported at:
57 ;; <https://lists.gnu.org/archive/html/bug-wget/2017-06/msg00009.html>.
58 (substitute* "testenv/Makefile"
59 (("SSL_TESTS=1") ""))
60 #t)))))
da7b042d 61 (inputs
fb7bdb43 62 `(("gnutls" ,gnutls)
dd2c73f6 63 ("libidn2" ,libidn2)
edda6db2 64 ("libpsl" ,libpsl)))
b5d4a811 65 (native-inputs
6b9540bc
LC
66 `(("pkg-config" ,pkg-config)
67 ("perl" ,perl)
fb7bdb43
EB
68 ("python" ,python) ;for testenv suite
69 ("perl-http-daemon" ,perl-http-daemon)
70 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
38eefbb1 71 (home-page "https://www.gnu.org/software/wget/")
f50d2669 72 (synopsis "Non-interactive command-line utility for downloading files")
da7b042d 73 (description
79c311b8 74 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
e881752c 75HTTPS and FTP protocols. It can resume interrupted downloads, use file name
a22dc0c4
LC
76wild cards, supports proxies and cookies, and it can convert absolute links
77in downloaded documents to relative links.")
4a44e743 78 (license gpl3+))) ; some files are under GPLv2+
22486fbe
EF
79
80(define-public wgetpaste
81 (package
82 (name "wgetpaste")
83 (version "2.28")
84 (source
85 (origin
86 (method url-fetch)
87 (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
88 version ".tar.bz2"))
89 (sha256
90 (base32
91 "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
92 (build-system gnu-build-system)
93 (arguments
94 '(#:phases
95 (modify-phases %standard-phases
96 (delete 'configure)
97 (delete 'build)
98 (replace 'install
99 (lambda* (#:key outputs #:allow-other-keys)
100 (let* ((out (assoc-ref outputs "out"))
101 (bin (string-append out "/bin"))
102 (zsh (string-append out "/share/zsh/site-functions")))
103 (install-file "wgetpaste" bin)
104 (install-file "_wgetpaste" zsh)))))
105 #:tests? #f)) ; no test target
106 (home-page "http://wgetpaste.zlin.dk/")
107 (synopsis "Script that automates pasting to a number of pastebin services")
108 (description
109 "@code{wgetpaste} is an extremely simple command-line interface to various
110online pastebin services.")
111 (license public-domain)))