Merge branch 'master' into staging
[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 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+git20180125")
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 (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 `(("libgc" ,libgc)
65 ("ncurses" ,ncurses)
66 ("openssl" ,openssl)
67 ("zlib" ,zlib)))
68 (native-inputs
69 `(("gettext" ,gettext-minimal)
70 ("perl" ,perl)
71 ("pkg-config" ,pkg-config)))
72 (home-page "http://w3m.sourceforge.net/")
73 (synopsis "Text-mode web browser")
74 (description
75 "w3m is a text-based web browser as well as a pager like 'more' or
76 'less'. With w3m you can browse web pages through a terminal emulator
77 window. Moreover, w3m can be used as a text formatting tool which
78 typesets HTML into plain text.")
79 (license (x11-style "file://doc/README"
80 "See 'doc/README' in the distribution."))))