w3m.scm 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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, 2019 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
  7. ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages w3m)
  25. #:use-module ((guix licenses) #:select (x11-style))
  26. #:use-module (gnu packages gettext)
  27. #:use-module (gnu packages bdw-gc)
  28. #:use-module (gnu packages compression)
  29. #:use-module (gnu packages gtk)
  30. #:use-module (gnu packages image)
  31. #:use-module (gnu packages ncurses)
  32. #:use-module (gnu packages perl)
  33. #:use-module (gnu packages pkg-config)
  34. #:use-module (gnu packages tls)
  35. #:use-module (gnu packages xorg)
  36. #:use-module (gnu packages)
  37. #:use-module (guix packages)
  38. #:use-module (guix git-download)
  39. #:use-module (guix build-system gnu))
  40. (define-public w3m
  41. (package
  42. (name "w3m")
  43. (version "0.5.3+git20210102")
  44. (source (origin
  45. (method git-fetch)
  46. ;; Debian's fork of w3m is the only one that is still maintained.
  47. (uri (git-reference
  48. (url "https://salsa.debian.org/debian/w3m.git")
  49. (commit (string-append "v" version))))
  50. (file-name (git-file-name name version))
  51. (sha256
  52. (base32
  53. "0amq1wfjp5mhqjmvrc0yhxjlx1335p78d7ap8iykfjn5h8yhmrg5"))))
  54. (build-system gnu-build-system)
  55. (arguments
  56. '(#:tests? #f ; no check target
  57. ;; Use $EDITOR instead of a hard-coded value.
  58. #:configure-flags (list "--with-editor="
  59. "--with-imagelib=imlib2")
  60. #:phases
  61. (modify-phases %standard-phases
  62. (add-before 'configure 'fix-perl
  63. (lambda _ (substitute* '("scripts/w3mmail.cgi.in"
  64. "scripts/dirlist.cgi.in")
  65. (("@PERL@") (which "perl"))))))))
  66. (inputs
  67. `(("gdk-pixbuf" ,gdk-pixbuf)
  68. ("imlib2" ,imlib2)
  69. ("libgc" ,libgc)
  70. ("libx11" ,libx11)
  71. ("ncurses" ,ncurses)
  72. ("openssl" ,openssl)
  73. ("zlib" ,zlib)))
  74. (native-inputs
  75. `(("gettext" ,gettext-minimal)
  76. ("perl" ,perl)
  77. ("pkg-config" ,pkg-config)))
  78. (home-page "http://w3m.sourceforge.net/")
  79. (synopsis "Text-mode web browser")
  80. (description
  81. "w3m is a text-based web browser as well as a pager like @code{more} or
  82. @code{less}. With w3m you can browse web pages through a terminal emulator
  83. window. Moreover, w3m can be used as a text formatting tool which
  84. typesets HTML into plain text.")
  85. (license (x11-style "file://doc/README"
  86. "See 'doc/README' in the distribution."))))