projects/guix·blob javascript-team · refs

110 lines · 4.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2016, 2017, 2018, 2023 Leo Famulari <[email protected]>
4;;; Copyright © 2016 Kei Kebreau <[email protected]>
5;;; Copyright © 2016, 2019 Efraim Flashner <[email protected]>
6;;; Copyright © 2018 Rutger Helling <[email protected]>
7;;; Copyright © 2020 Tobias Geerinckx-Rice <[email protected]>
8;;; Copyright © 2021 Maxim Cournoyer <[email protected]>>
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 #:use-module ((guix search-paths) #:select ($SSL_CERT_DIR $SSL_CERT_FILE)))
42
43(define-public w3m
44 (package
45 (name "w3m")
46 ;; When updating, be careful not to change the derivation of w3m-for-tests,
47 ;; unless you mean to. Changing w3m-for-tests will cause thousands of
48 ;; rebuilds via the reverse dependency graph of xdg-utils.
49 (version "0.5.3+git20230121")
50 (source (origin
51 (method git-fetch)
52 ;; Debian's fork of w3m is the only one that is still maintained.
53 (uri (git-reference
54 (url "https://salsa.debian.org/debian/w3m.git")
55 (commit (string-append "v" version))))
56 (file-name (git-file-name name version))
57 (sha256
58 (base32
59 "0nvhxsqxgxjrr62mvxzhhfzvbvg56g19vlqcgb8mh2x1daazk5ms"))))
60 (build-system gnu-build-system)
61 (arguments
62 '(#:tests? #f ; no check target
63 ;; Use $EDITOR instead of a hard-coded value.
64 #:configure-flags (list "--with-editor="
65 "--with-imagelib=imlib2"
66 "--enable-image=fb,x11")
67 #:phases
68 (modify-phases %standard-phases
69 (add-before 'configure 'fix-perl
70 (lambda _ (substitute* '("scripts/w3mmail.cgi.in"
71 "scripts/dirlist.cgi.in")
72 (("@PERL@") (which "perl"))))))))
73 (inputs
74 (list gdk-pixbuf
75 imlib2
76 libgc
77 libx11
78 ncurses
79 openssl
80 zlib))
81 (native-inputs
82 (list gettext-minimal perl pkg-config))
83 (native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))
84 (home-page "https://w3m.sourceforge.net/")
85 (synopsis "Text-mode web browser")
86 (description
87 "w3m is a text-based web browser as well as a pager like @code{more} or
88@code{less}. With w3m you can browse web pages through a terminal emulator
89window. Moreover, w3m can be used as a text formatting tool which
90typesets HTML into plain text.")
91 (license (x11-style "file://doc/README"
92 "See 'doc/README' in the distribution."))))
93
94;; Used in the test suite of xdg-utils
95(define-public w3m-for-tests
96 (hidden-package
97 (package
98 (inherit w3m)
99 (name "w3m")
100 (version "0.5.3+git20230121")
101 (source (origin
102 (method git-fetch)
103 ;; Debian's fork of w3m is the only one that is still maintained.
104 (uri (git-reference
105 (url "https://salsa.debian.org/debian/w3m.git")
106 (commit (string-append "v" version))))
107 (file-name (git-file-name name version))
108 (sha256
109 (base32
110 "0nvhxsqxgxjrr62mvxzhhfzvbvg56g19vlqcgb8mh2x1daazk5ms")))))))