gnu: python-html5lib: Add dependency on python-webencodings.
[jackhill/guix/guix.git] / gnu / packages / w3m.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
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 ncurses)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages tls)
31 #:use-module (gnu packages)
32 #:use-module (guix packages)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system gnu))
35
36 (define-public w3m
37 (package
38 (name "w3m")
39 (version "0.5.3+git20161120")
40 (source (origin
41 (method git-fetch)
42 ;; Debian's fork of w3m is the only one that is still
43 ;; maintained.
44 (uri (git-reference
45 (url "https://anonscm.debian.org/cgit/collab-maint/w3m.git")
46 (commit (string-append "v" version))))
47 (file-name (string-append "w3m-" version "-checkout"))
48 (sha256
49 (base32
50 "06n5a9jdyihkd4xdjmyci32dpqp1k2l5awia5g9ng0bn256bacdc"))))
51 (build-system gnu-build-system)
52 (arguments
53 '(#:tests? #f ; no check target
54 #:phases
55 (modify-phases %standard-phases
56 (add-before 'configure 'fix-perl
57 (lambda _ (substitute* '("scripts/w3mmail.cgi.in"
58 "scripts/dirlist.cgi.in")
59 (("@PERL@") (which "perl")))
60 #t)))))
61 (inputs
62 `(("libgc" ,libgc)
63 ("ncurses" ,ncurses)
64 ("openssl" ,openssl)
65 ("zlib" ,zlib)))
66 (native-inputs
67 `(("gettext" ,gettext-minimal)
68 ("perl" ,perl)
69 ("pkg-config" ,pkg-config)))
70 (home-page "http://w3m.sourceforge.net/")
71 (synopsis "Text-mode web browser")
72 (description
73 "w3m is a text-based web browser as well as a pager like 'more' or
74 'less'. With w3m you can browse web pages through a terminal emulator
75 window. Moreover, w3m can be used as a text formatting tool which
76 typesets HTML into plain text.")
77 (license (x11-style "file://doc/README"
78 "See 'doc/README' in the distribution."))))