wget.scm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
  3. ;;; Copyright © 2014, 2015, 2017 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. (define-module (gnu packages wget)
  21. #:use-module (guix licenses)
  22. #:use-module (gnu packages)
  23. #:use-module (gnu packages libidn)
  24. #:use-module (gnu packages python)
  25. #:use-module (gnu packages perl)
  26. #:use-module (gnu packages web)
  27. #:use-module (gnu packages pkg-config)
  28. #:use-module (gnu packages tls)
  29. #:use-module (guix packages)
  30. #:use-module (guix download)
  31. #:use-module (guix build-system gnu))
  32. (define-public wget
  33. (package
  34. (name "wget")
  35. (version "1.19.1")
  36. (source
  37. (origin
  38. (method url-fetch)
  39. (uri (string-append "mirror://gnu/wget/wget-"
  40. version ".tar.xz"))
  41. (patches (search-patches "wget-CVE-2017-6508.patch"
  42. "wget-fix-504-test-timeout.patch"
  43. "wget-perl-5.26.patch"))
  44. (sha256
  45. (base32
  46. "1ljcfhbkdsd0zjfm520rbl1ai62fc34i7c45sfj244l8f6b0p58c"))))
  47. (build-system gnu-build-system)
  48. (arguments
  49. '(#:phases (modify-phases %standard-phases
  50. (add-before 'check 'disable-https-tests
  51. (lambda _
  52. ;; XXX: Skip TLS tests, which fail with "The
  53. ;; certificate's owner does not match hostname" as
  54. ;; reported at:
  55. ;; <https://lists.gnu.org/archive/html/bug-wget/2017-07/msg00012.html>.
  56. ;; The problem appears to be due to a change in GnuTLS
  57. ;; 3.5.12, whereby 'gnutls_x509_crt_check_hostname2' no
  58. ;; longer matches IP address against the 'CN' or
  59. ;; 'DNSname' fields of certificates.
  60. (substitute* "testenv/Makefile"
  61. (("SSL_TESTS=1") ""))
  62. #t)))))
  63. (inputs
  64. `(("gnutls" ,gnutls)
  65. ("libidn2" ,libidn2)
  66. ("libpsl" ,libpsl)))
  67. (native-inputs
  68. `(("pkg-config" ,pkg-config)
  69. ("perl" ,perl)
  70. ("python" ,python) ;for testenv suite
  71. ("perl-http-daemon" ,perl-http-daemon)
  72. ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
  73. (home-page "https://www.gnu.org/software/wget/")
  74. (synopsis "Non-interactive command-line utility for downloading files")
  75. (description
  76. "GNU Wget is a non-interactive tool for fetching files using the HTTP,
  77. HTTPS and FTP protocols. It can resume interrupted downloads, use file name
  78. wild cards, supports proxies and cookies, and it can convert absolute links
  79. in downloaded documents to relative links.")
  80. (license gpl3+))) ; some files are under GPLv2+
  81. (define-public wgetpaste
  82. (package
  83. (name "wgetpaste")
  84. (version "2.28")
  85. (source
  86. (origin
  87. (method url-fetch)
  88. (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
  89. version ".tar.bz2"))
  90. (sha256
  91. (base32
  92. "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
  93. (build-system gnu-build-system)
  94. (arguments
  95. '(#:phases
  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)
  105. (install-file "_wgetpaste" zsh)))))
  106. #:tests? #f)) ; no test target
  107. (home-page "http://wgetpaste.zlin.dk/")
  108. (synopsis "Script that automates pasting to a number of pastebin services")
  109. (description
  110. "@code{wgetpaste} is an extremely simple command-line interface to various
  111. online pastebin services.")
  112. (license public-domain)))