gnu: icecat: Use system harfbuzz and graphite2 libraries.
[jackhill/guix/guix.git] / gnu / packages / web-browsers.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
6 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages web-browsers)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages fltk)
30 #:use-module (gnu packages fontutils)
31 #:use-module (gnu packages gnupg)
32 #:use-module (gnu packages libevent)
33 #:use-module (gnu packages libidn)
34 #:use-module (gnu packages ncurses)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages python-web)
39 #:use-module (gnu packages qt)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages tls)
42 #:use-module (gnu packages xorg)
43 #:use-module (guix download)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system python))
46
47 (define-public dillo
48 (package
49 (name "dillo")
50 (version "3.0.5")
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "http://www.dillo.org/download/"
54 name "-" version ".tar.bz2"))
55 (sha256
56 (base32
57 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
58 (build-system gnu-build-system)
59 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
60 (native-inputs `(("pkg-config" ,pkg-config)))
61 (inputs `(("fltk" ,fltk)
62 ("fontconfig" ,fontconfig)
63 ("libjpeg" ,libjpeg)
64 ("libpng" ,libpng)
65 ("libxcursor" ,libxcursor)
66 ("libxft" ,libxft)
67 ("libxi" ,libxi)
68 ("libxinerama" ,libxinerama)
69 ("openssl" ,openssl)
70 ("perl" ,perl)
71 ("zlib" ,zlib)))
72 (synopsis "Very small and fast graphical web browser")
73 (description "Dillo is a minimalistic web browser particularly intended for
74 older or slower computers and embedded systems.")
75 (home-page "http://www.dillo.org")
76 (license license:gpl3+)))
77
78 (define-public links
79 (package
80 (name "links")
81 (version "2.14")
82 (source (origin
83 (method url-fetch)
84 (uri (string-append "http://links.twibright.com/download/"
85 name "-" version ".tar.bz2"))
86 (patches (search-patches "links-CVE-2017-11114.patch"))
87 (sha256
88 (base32
89 "1f24y83wa1vzzjq5kp857gjqdpnmf8pb29yw7fam0m8wxxw0c3gp"))))
90 (build-system gnu-build-system)
91 (arguments
92 `(#:phases
93 (modify-phases %standard-phases
94 (replace 'configure
95 (lambda* (#:key outputs #:allow-other-keys)
96 ;; The tarball uses a very old version of autconf. It doesn't
97 ;; understand extra flags like `--enable-fast-install', so
98 ;; we need to invoke it with just what it understands.
99 (let ((out (assoc-ref outputs "out")))
100 ;; 'configure' doesn't understand '--host'.
101 ,@(if (%current-target-system)
102 `((setenv "CHOST" ,(%current-target-system)))
103 '())
104 (setenv "CONFIG_SHELL" (which "bash"))
105 (zero?
106 (system* "./configure"
107 (string-append "--prefix=" out)
108 "--enable-graphics"))))))))
109 (native-inputs `(("pkg-config" ,pkg-config)))
110 (inputs `(("zlib" ,zlib)
111 ("openssl" ,openssl)
112 ("libjpeg" ,libjpeg)
113 ("libtiff" ,libtiff)
114 ("libevent" ,libevent)
115 ("libpng" ,libpng)
116 ("libxt" ,libxt)))
117 (synopsis "Text and graphics mode web browser")
118 (description "Links is a graphics and text mode web browser, with many
119 features including, tables, builtin image display, bookmarks, SSL and more.")
120 (home-page "http://links.twibright.com")
121 ;; The distribution contains a copy of GPLv2
122 ;; However, the copyright notices simply say:
123 ;; "This file is a part of the Links program, released under GPL."
124 ;; Therefore, under the provisions of Section 9, we can choose
125 ;; any version ever published by the FSF.
126 ;; One file (https.c) contains an exception permitting
127 ;; linking of the program with openssl.
128 (license license:gpl1+)))
129
130 (define-public lynx
131 (package
132 (name "lynx")
133 (version "2.8.9dev.16")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append
137 "http://invisible-mirror.net/archives/lynx/tarballs"
138 "/lynx" version ".tar.bz2"))
139 (sha256
140 (base32
141 "1j0vx871ghkm7fgrafnvd2ml3ywcl8d3gyhq02fhfb851c88lc84"))))
142 (build-system gnu-build-system)
143 (native-inputs `(("pkg-config" ,pkg-config)
144 ("perl" ,perl)))
145 (inputs `(("ncurses" ,ncurses)
146 ("libidn" ,libidn)
147 ("gnutls" ,gnutls)
148 ("libgcrypt" ,libgcrypt)
149 ("unzip" ,unzip)
150 ("zlib" ,zlib)
151 ("gzip" ,gzip)
152 ("bzip2" ,bzip2)))
153 (arguments
154 `(#:configure-flags
155 (let ((gnutls (assoc-ref %build-inputs "gnutls")))
156 `("--with-pkg-config"
157 "--with-screen=ncurses"
158 "--with-zlib"
159 "--with-bzlib"
160 ,(string-append "--with-gnutls=" gnutls)
161 ;; "--with-socks5" ; XXX TODO
162 "--enable-widec"
163 "--enable-ascii-ctypes"
164 "--enable-local-docs"
165 "--enable-htmlized-cfg"
166 "--enable-gzip-help"
167 "--enable-nls"
168 "--enable-ipv6"))
169 #:tests? #f ; no check target
170 #:phases
171 (modify-phases %standard-phases
172 (add-before 'configure 'set-makefile-shell
173 (lambda _ (substitute* "po/makefile.inn"
174 (("/bin/sh") (which "sh")))
175 #t))
176 (replace 'install
177 (lambda* (#:key (make-flags '()) #:allow-other-keys)
178 (zero? (apply system* "make" "install-full" make-flags)))))))
179 (synopsis "Text Web Browser")
180 (description
181 "Lynx is a fully-featured World Wide Web (WWW) client for users running
182 cursor-addressable, character-cell display devices. It will display Hypertext
183 Markup Language (HTML) documents containing links to files on the local
184 system, as well as files on remote systems running http, gopher, ftp, wais,
185 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
186 the WWW, or to build information systems intended primarily for local
187 access.")
188 (home-page "https://lynx.invisible-island.net/")
189 (license license:gpl2)))
190
191 (define-public qutebrowser
192 (package
193 (name "qutebrowser")
194 (version "0.11.0")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (string-append "https://github.com/The-Compiler/"
199 "qutebrowser/releases/download/v" version "/"
200 "qutebrowser-" version ".tar.gz"))
201 (sha256
202 (base32
203 "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv"))))
204 (build-system python-build-system)
205 (native-inputs
206 `(("asciidoc" ,asciidoc)))
207 (inputs
208 `(("python-colorama" ,python-colorama)
209 ("python-cssutils" ,python-cssutils)
210 ("python-jinja2" ,python-jinja2)
211 ("python-markupsafe" ,python-markupsafe)
212 ("python-pygments" ,python-pygments)
213 ("python-pypeg2" ,python-pypeg2)
214 ("python-pyyaml" ,python-pyyaml)
215 ("python-pyqt" ,python-pyqt)
216 ("qtwebkit" ,qtwebkit)))
217 (arguments
218 `(#:tests? #f ;no tests
219 #:phases
220 (modify-phases %standard-phases
221 (add-after 'install 'install-more
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let* ((out (assoc-ref outputs "out"))
224 (app (string-append out "/share/applications"))
225 (hicolor (string-append out "/share/icons/hicolor")))
226 (system* "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
227 (install-file "doc/qutebrowser.1"
228 (string-append out "/share/man/man1"))
229
230 (for-each
231 (lambda (i)
232 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
233 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
234 hicolor i i)))
235 (mkdir-p (dirname dest))
236 (copy-file src dest)))
237 '(16 24 32 48 64 128 256 512))
238 (install-file "icons/qutebrowser.svg"
239 (string-append hicolor "/scalable/apps"))
240
241 (substitute* "qutebrowser.desktop"
242 (("Exec=qutebrowser")
243 (string-append "Exec=" out "/bin/qutebrowser")))
244 (install-file "qutebrowser.desktop" app)
245 #t))))))
246 (home-page "https://qutebrowser.org/")
247 (synopsis "Minimal, keyboard-focused, vim-like web browser")
248 (description "qutebrowser is a keyboard-focused browser with a minimal
249 GUI. It is based on PyQt5 and QtWebKit.")
250 (license license:gpl3+)))