gnu: gnome: Depend on xdg-user-dirs.
[jackhill/guix/guix.git] / gnu / packages / wget.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages wget)
22 #:use-module (guix licenses)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages libidn)
25 #:use-module (gnu packages python)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages web)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages tls)
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")
37 (version "1.19.1")
38 (source
39 (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/wget/wget-"
42 version ".tar.xz"))
43 (patches (search-patches "wget-CVE-2017-6508.patch"
44 "wget-fix-504-test-timeout.patch"))
45 (sha256
46 (base32
47 "1ljcfhbkdsd0zjfm520rbl1ai62fc34i7c45sfj244l8f6b0p58c"))))
48 (build-system gnu-build-system)
49 (inputs
50 `(("gnutls" ,gnutls)
51 ("libidn2" ,libidn2)
52 ("libpsl" ,libpsl)))
53 (native-inputs
54 `(("pkg-config" ,pkg-config)
55 ("perl" ,perl)
56 ("python" ,python) ;for testenv suite
57 ("perl-http-daemon" ,perl-http-daemon)
58 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
59 (home-page "https://www.gnu.org/software/wget/")
60 (synopsis "Non-interactive command-line utility for downloading files")
61 (description
62 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
63 HTTPS and FTP protocols. It can resume interrupted downloads, use file name
64 wild cards, supports proxies and cookies, and it can convert absolute links
65 in downloaded documents to relative links.")
66 (license gpl3+))) ; some files are under GPLv2+
67
68 (define-public wgetpaste
69 (package
70 (name "wgetpaste")
71 (version "2.28")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
76 version ".tar.bz2"))
77 (sha256
78 (base32
79 "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
80 (build-system gnu-build-system)
81 (arguments
82 '(#:phases
83 (modify-phases %standard-phases
84 (delete 'configure)
85 (delete 'build)
86 (replace 'install
87 (lambda* (#:key outputs #:allow-other-keys)
88 (let* ((out (assoc-ref outputs "out"))
89 (bin (string-append out "/bin"))
90 (zsh (string-append out "/share/zsh/site-functions")))
91 (install-file "wgetpaste" bin)
92 (install-file "_wgetpaste" zsh)))))
93 #:tests? #f)) ; no test target
94 (home-page "http://wgetpaste.zlin.dk/")
95 (synopsis "Script that automates pasting to a number of pastebin services")
96 (description
97 "@code{wgetpaste} is an extremely simple command-line interface to various
98 online pastebin services.")
99 (license public-domain)))