1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
6 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages wget)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages gnunet)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages libidn)
32 #:use-module (gnu packages pcre)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages python)
36 #:use-module (gnu packages tls)
37 #:use-module (gnu packages web)
38 #:use-module (gnu packages xdisorg)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix build-system gnu))
50 (uri (string-append "mirror://gnu/wget/wget-"
54 "1frajd86ds8vz2hprq30wq8ya89z9dcxnwm8nwk12bbc47l7qq39"))))
55 (build-system gnu-build-system)
62 `(("pkg-config" ,pkg-config)
64 ("python" ,python) ;for testenv suite
65 ("perl-http-daemon" ,perl-http-daemon)
66 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
67 (home-page "https://www.gnu.org/software/wget/")
68 (synopsis "Non-interactive command-line utility for downloading files")
70 "GNU Wget is a non-interactive tool for fetching files using the HTTP,
71 HTTPS and FTP protocols. It can resume interrupted downloads, use file name
72 wild cards, supports proxies and cookies, and it can convert absolute links
73 in downloaded documents to relative links.")
74 (license license:gpl3+))) ; some files are under GPLv2+
76 (define-public wgetpaste
83 (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
87 "1rp0wxr3zy7y2xp3azaadfghrx7g0m138f9qg6icjxkkz4vj9r22"))))
88 (build-system gnu-build-system)
90 `(#:modules ((guix build gnu-build-system)
94 (modify-phases %standard-phases
97 (add-after 'unpack 'remove-dead-paste-site
98 ;; This phase is adaped from the following patch:
99 ;; https://gitweb.gentoo.org/repo/gentoo.git/tree/app-text/wgetpaste/files/wgetpaste-remove-dead.patch
101 (substitute* "wgetpaste"
102 (("-bpaste") "-dpaste")) ; dpaste blocks tor users
105 (lambda* (#:key outputs #:allow-other-keys)
106 (let* ((out (assoc-ref outputs "out"))
107 (bin (string-append out "/bin"))
108 (zsh (string-append out "/share/zsh/site-functions"))
109 (doc (string-append out "/share/doc/" ,name "-" ,version)))
110 (install-file "wgetpaste" bin)
111 (install-file "_wgetpaste" zsh)
112 (install-file "LICENSE" doc)
114 (add-after 'install 'wrap-program
115 ;; /bin/wgetpaste prides itself on relying only on the following
116 ;; inputs, and doesn't need to execute arbitrary commands, so
117 ;; override PATH completely to detect any new dependencies early.
118 (lambda* (#:key outputs #:allow-other-keys)
119 (let ((out (assoc-ref outputs "out")))
120 (wrap-program (string-append out "/bin/wgetpaste")
123 (map (lambda (command) (dirname (which command)))
124 (list "bash" "mktemp" "sed" "sort" "tee" "tr"
127 #:tests? #f)) ; no test target
131 (home-page "http://wgetpaste.zlin.dk/")
132 (synopsis "Script that automates pasting to a number of pastebin services")
134 "@code{wgetpaste} is an extremely simple command-line interface to various
135 online pastebin services.")
136 (license license:expat)))
145 (uri (string-append "mirror://gnu/wget/wget2-" version ".tar.gz"))
148 "0qv55f4bablrlhc8bnic8g3mkk1kq44c4cphrk5jmv92z9aqzi6b"))))
149 (build-system gnu-build-system)
152 (modify-phases %standard-phases
153 (add-after 'unpack 'skip-network-tests
155 (substitute* "tests/Makefile.in"
156 (("test-gpg-verify-no-file\\$\\(EXEEXT)") "")
157 (("test-gpg-valid\\$\\(EXEEXT)") "")
158 (("test-gpg-styles\\$\\(EXEEXT)") ""))
160 #:configure-flags '("--enable-static=no")))
163 ("gnutls" ,gnutls/dane)
165 ("libiconv" ,libiconv)
167 ("libmicrohttpd" ,libmicrohttpd)
171 ;; TODO: Add libbrotlidec, libnghttp2.
173 `(("pkg-config" ,pkg-config)))
174 (home-page "https://gitlab.com/gnuwget/wget2")
175 (synopsis "Successor of GNU Wget")
176 (description "GNU Wget2 is the successor of GNU Wget, a file and recursive
177 website downloader. Designed and written from scratch it wraps around libwget,
178 that provides the basic functions needed by a web client.")
179 (license (list license:gpl3+ license:lgpl3+))))