w3m.scm 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  3. ;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
  4. ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
  5. ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
  7. ;;;
  8. ;;; This file is part of GNU Guix.
  9. ;;;
  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.
  14. ;;;
  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.
  19. ;;;
  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/>.
  22. (define-module (gnu packages w3m)
  23. #:use-module ((guix licenses) #:select (x11-style))
  24. #:use-module (gnu packages gettext)
  25. #:use-module (gnu packages bdw-gc)
  26. #:use-module (gnu packages compression)
  27. #:use-module (gnu packages gtk)
  28. #:use-module (gnu packages ncurses)
  29. #:use-module (gnu packages perl)
  30. #:use-module (gnu packages pkg-config)
  31. #:use-module (gnu packages tls)
  32. #:use-module (gnu packages xorg)
  33. #:use-module (gnu packages)
  34. #:use-module (guix packages)
  35. #:use-module (guix git-download)
  36. #:use-module (guix build-system gnu))
  37. (define-public w3m
  38. (package
  39. (name "w3m")
  40. (version "0.5.3+git20180125")
  41. (source (origin
  42. (method git-fetch)
  43. ;; Debian's fork of w3m is the only one that is still maintained.
  44. (uri (git-reference
  45. (url "https://salsa.debian.org/debian/w3m.git")
  46. (commit (string-append "v" version))))
  47. (file-name (git-file-name name version))
  48. (sha256
  49. (base32
  50. "0dafdfx1yhrvhbqzslkcapj09dvf64m2jadz3wl2icni0k4msq90"))))
  51. (build-system gnu-build-system)
  52. (arguments
  53. '(#:tests? #f ; no check target
  54. ;; Use $EDITOR instead of a hard-coded value.
  55. #:configure-flags '("--with-editor=")
  56. #:phases
  57. (modify-phases %standard-phases
  58. (add-before 'configure 'fix-perl
  59. (lambda _ (substitute* '("scripts/w3mmail.cgi.in"
  60. "scripts/dirlist.cgi.in")
  61. (("@PERL@") (which "perl")))
  62. #t)))))
  63. (inputs
  64. `(("gdk-pixbuf" ,gdk-pixbuf)
  65. ("libgc" ,libgc)
  66. ("libx11" ,libx11)
  67. ("ncurses" ,ncurses)
  68. ("openssl" ,openssl)
  69. ("zlib" ,zlib)))
  70. (native-inputs
  71. `(("gettext" ,gettext-minimal)
  72. ("perl" ,perl)
  73. ("pkg-config" ,pkg-config)))
  74. (home-page "http://w3m.sourceforge.net/")
  75. (synopsis "Text-mode web browser")
  76. (description
  77. "w3m is a text-based web browser as well as a pager like 'more' or
  78. 'less'. With w3m you can browse web pages through a terminal emulator
  79. window. Moreover, w3m can be used as a text formatting tool which
  80. typesets HTML into plain text.")
  81. (license (x11-style "file://doc/README"
  82. "See 'doc/README' in the distribution."))))