gnu: Add texlive-generic-xstring.
[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, 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
25 (define-module (gnu packages w3m)
26 #:use-module ((guix licenses) #:select (x11-style))
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages bdw-gc)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages image)
32 #:use-module (gnu packages ncurses)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages tls)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages)
38 #:use-module (guix packages)
39 #:use-module (guix git-download)
40 #:use-module (guix build-system gnu))
41
42 (define-public w3m
43 (package
44 (name "w3m")
45 (version "0.5.3+git20210102")
46 (source (origin
47 (method git-fetch)
48 ;; Debian's fork of w3m is the only one that is still maintained.
49 (uri (git-reference
50 (url "https://salsa.debian.org/debian/w3m.git")
51 (commit (string-append "v" version))))
52 (file-name (git-file-name name version))
53 (sha256
54 (base32
55 "0amq1wfjp5mhqjmvrc0yhxjlx1335p78d7ap8iykfjn5h8yhmrg5"))))
56 (build-system gnu-build-system)
57 (arguments
58 '(#:tests? #f ; no check target
59 ;; Use $EDITOR instead of a hard-coded value.
60 #:configure-flags (list "--with-editor="
61 "--with-imagelib=imlib2")
62 #:phases
63 (modify-phases %standard-phases
64 (add-before 'configure 'fix-perl
65 (lambda _ (substitute* '("scripts/w3mmail.cgi.in"
66 "scripts/dirlist.cgi.in")
67 (("@PERL@") (which "perl"))))))))
68 (inputs
69 (list gdk-pixbuf
70 imlib2
71 libgc
72 libx11
73 ncurses
74 openssl
75 zlib))
76 (native-inputs
77 `(("gettext" ,gettext-minimal)
78 ("perl" ,perl)
79 ("pkg-config" ,pkg-config)))
80 (home-page "http://w3m.sourceforge.net/")
81 (synopsis "Text-mode web browser")
82 (description
83 "w3m is a text-based web browser as well as a pager like @code{more} or
84 @code{less}. With w3m you can browse web pages through a terminal emulator
85 window. Moreover, w3m can be used as a text formatting tool which
86 typesets HTML into plain text.")
87 (license (x11-style "file://doc/README"
88 "See 'doc/README' in the distribution."))))