gnu: weechat: update to 2.5
[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 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
9 ;;; Copyright © 2018 Timo Eisenmann <eisenmann@fn.de>
10 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages web-browsers)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages fltk)
34 #:use-module (gnu packages fontutils)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages gnupg)
37 #:use-module (gnu packages libevent)
38 #:use-module (gnu packages libidn)
39 #:use-module (gnu packages lisp)
40 #:use-module (gnu packages lua)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages python-web)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages sqlite)
51 #:use-module (gnu packages tls)
52 #:use-module (gnu packages webkit)
53 #:use-module (gnu packages xorg)
54 #:use-module (gnu packages gcc)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system gnu)
58 #:use-module (guix build-system glib-or-gtk)
59 #:use-module (guix build-system python)
60 #:use-module (guix build-system asdf))
61
62 (define-public dillo
63 (package
64 (name "dillo")
65 (version "3.0.5")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "http://www.dillo.org/download/"
69 name "-" version ".tar.bz2"))
70 (sha256
71 (base32
72 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
73 (build-system gnu-build-system)
74 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
75 (native-inputs `(("pkg-config" ,pkg-config)))
76 (inputs `(("fltk" ,fltk)
77 ("fontconfig" ,fontconfig)
78 ("libjpeg" ,libjpeg)
79 ("libpng" ,libpng)
80 ("libxcursor" ,libxcursor)
81 ("libxft" ,libxft)
82 ("libxi" ,libxi)
83 ("libxinerama" ,libxinerama)
84 ("openssl" ,openssl)
85 ("perl" ,perl)
86 ("zlib" ,zlib)))
87 (synopsis "Very small and fast graphical web browser")
88 (description "Dillo is a minimalistic web browser particularly intended for
89 older or slower computers and embedded systems.")
90 (home-page "http://www.dillo.org")
91 (license license:gpl3+)))
92
93 (define-public links
94 (package
95 (name "links")
96 (version "2.19")
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "http://links.twibright.com/download/"
100 "links-" version ".tar.bz2"))
101 (sha256
102 (base32
103 "02ls11c02p7xvsdjyb43rrzr850i1yly003r812z0w5vv5yqqxbh"))))
104 (build-system gnu-build-system)
105 (arguments
106 `(#:phases
107 (modify-phases %standard-phases
108 (replace 'configure
109 (lambda* (#:key outputs #:allow-other-keys)
110 ;; The tarball uses a very old version of autconf. It doesn't
111 ;; understand extra flags like `--enable-fast-install', so
112 ;; we need to invoke it with just what it understands.
113 (let ((out (assoc-ref outputs "out")))
114 ;; 'configure' doesn't understand '--host'.
115 ,@(if (%current-target-system)
116 `((setenv "CHOST" ,(%current-target-system)))
117 '())
118 (setenv "CONFIG_SHELL" (which "bash"))
119 (invoke "./configure"
120 (string-append "--prefix=" out)
121 "--enable-graphics")
122 #t))))))
123 (native-inputs `(("pkg-config" ,pkg-config)))
124 (inputs `(("zlib" ,zlib)
125 ("openssl" ,openssl)
126 ("libjpeg" ,libjpeg)
127 ("libtiff" ,libtiff)
128 ("libevent" ,libevent)
129 ("libpng" ,libpng)
130 ("libxt" ,libxt)))
131 (synopsis "Text and graphics mode web browser")
132 (description "Links is a graphics and text mode web browser, with many
133 features including, tables, builtin image display, bookmarks, SSL and more.")
134 (home-page "http://links.twibright.com")
135 ;; The distribution contains a copy of GPLv2
136 ;; However, the copyright notices simply say:
137 ;; "This file is a part of the Links program, released under GPL."
138 ;; Therefore, under the provisions of Section 9, we can choose
139 ;; any version ever published by the FSF.
140 ;; One file (https.c) contains an exception permitting
141 ;; linking of the program with openssl.
142 (license license:gpl1+)))
143
144 (define-public luakit
145 (package
146 (name "luakit")
147 (version "2.1")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append "https://github.com/luakit/luakit/archive/" version
151 ".tar.gz"))
152 (sha256
153 (base32
154 "09kgsm2w2xa4xwylsi0bwjvdl9k6hkyjyyrq2i3l8bvi2qrs5gzc"))
155 (file-name (string-append name "-" version ".tar.gz"))))
156 (inputs
157 `(("lua-5.1" ,lua-5.1)
158 ("gtk+" ,gtk+)
159 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
160 ("glib-networking" ,glib-networking)
161 ("lua5.1-filesystem" ,lua5.1-filesystem)
162 ("luajit" ,luajit)
163 ("webkitgtk" ,webkitgtk)
164 ("sqlite" ,sqlite)))
165 (native-inputs
166 `(("pkg-config" ,pkg-config)))
167 (build-system glib-or-gtk-build-system)
168 (arguments
169 '(#:make-flags
170 (let ((out (assoc-ref %outputs "out")))
171 (list
172 "CC=gcc"
173 "LUA_BIN_NAME=lua"
174 "DEVELOPMENT_PATHS=0"
175 (string-append "PREFIX=" out)
176 (string-append "XDGPREFIX=" out "/etc/xdg")))
177 #:phases
178 (modify-phases %standard-phases
179 (add-before 'build 'lfs-workaround
180 (lambda _
181 (setenv "LUA_CPATH"
182 (string-append
183 (assoc-ref %build-inputs "lua5.1-filesystem")
184 "/lib/lua/5.1/?.so;;"))
185 #t))
186 (delete 'configure)
187 (delete 'check)
188 (add-after 'install 'wrap
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let* ((luakit (assoc-ref outputs "out"))
191 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
192 (gtk (assoc-ref inputs "gtk+"))
193 (gtk-share (string-append gtk "/share")))
194 (wrap-program (string-append luakit "/bin/luakit")
195 `("LUA_CPATH" prefix
196 (,(string-append lua5.1-filesystem
197 "/lib/lua/5.1/?.so;;")))
198 `("XDG_CONFIG_DIRS" prefix
199 (,(string-append luakit "/etc/xdg/"))))
200 #t))))))
201 (synopsis "Fast, lightweight, and simple browser based on WebKit")
202 (description "Luakit is a fast, lightweight, and simple to use
203 micro-browser framework extensible by Lua using the WebKit web content engine
204 and the GTK+ toolkit.")
205 (home-page "https://luakit.github.io/")
206 (license license:gpl3+)))
207
208 (define-public lynx
209 (package
210 (name "lynx")
211 (version "2.8.9rel.1")
212 (source (origin
213 (method url-fetch)
214 (uri (string-append
215 "http://invisible-mirror.net/archives/lynx/tarballs"
216 "/lynx" version ".tar.bz2"))
217 (sha256
218 (base32
219 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
220 (build-system gnu-build-system)
221 (native-inputs `(("pkg-config" ,pkg-config)
222 ("perl" ,perl)))
223 (inputs `(("ncurses" ,ncurses)
224 ("libidn" ,libidn)
225 ("gnutls" ,gnutls)
226 ("libgcrypt" ,libgcrypt)
227 ("unzip" ,unzip)
228 ("zlib" ,zlib)
229 ("gzip" ,gzip)
230 ("bzip2" ,bzip2)))
231 (arguments
232 `(#:configure-flags
233 (let ((gnutls (assoc-ref %build-inputs "gnutls")))
234 `("--with-pkg-config"
235 "--with-screen=ncurses"
236 "--with-zlib"
237 "--with-bzlib"
238 ,(string-append "--with-gnutls=" gnutls)
239 ;; "--with-socks5" ; XXX TODO
240 "--enable-widec"
241 "--enable-ascii-ctypes"
242 "--enable-local-docs"
243 "--enable-htmlized-cfg"
244 "--enable-gzip-help"
245 "--enable-nls"
246 "--enable-ipv6"))
247 #:tests? #f ; no check target
248 #:phases
249 (modify-phases %standard-phases
250 (add-before 'configure 'set-makefile-shell
251 (lambda _ (substitute* "po/makefile.inn"
252 (("/bin/sh") (which "sh")))
253 #t))
254 (replace 'install
255 (lambda* (#:key (make-flags '()) #:allow-other-keys)
256 (apply invoke "make" "install-full" make-flags)
257 #t)))))
258 (synopsis "Text Web Browser")
259 (description
260 "Lynx is a fully-featured World Wide Web (WWW) client for users running
261 cursor-addressable, character-cell display devices. It will display Hypertext
262 Markup Language (HTML) documents containing links to files on the local
263 system, as well as files on remote systems running http, gopher, ftp, wais,
264 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
265 the WWW, or to build information systems intended primarily for local
266 access.")
267 (home-page "https://lynx.invisible-island.net/")
268 (license license:gpl2)))
269
270 (define-public qutebrowser
271 (package
272 (name "qutebrowser")
273 (version "0.11.0")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append "https://github.com/The-Compiler/"
278 "qutebrowser/releases/download/v" version "/"
279 "qutebrowser-" version ".tar.gz"))
280 (sha256
281 (base32
282 "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv"))))
283 (build-system python-build-system)
284 (native-inputs
285 `(("asciidoc" ,asciidoc)))
286 (inputs
287 `(("python-colorama" ,python-colorama)
288 ("python-cssutils" ,python-cssutils)
289 ("python-jinja2" ,python-jinja2)
290 ("python-markupsafe" ,python-markupsafe)
291 ("python-pygments" ,python-pygments)
292 ("python-pypeg2" ,python-pypeg2)
293 ("python-pyyaml" ,python-pyyaml)
294 ("python-pyqt" ,python-pyqt)
295 ("qtwebkit" ,qtwebkit)))
296 (arguments
297 `(#:tests? #f ;no tests
298 #:phases
299 (modify-phases %standard-phases
300 (add-after 'install 'install-more
301 (lambda* (#:key outputs #:allow-other-keys)
302 (let* ((out (assoc-ref outputs "out"))
303 (app (string-append out "/share/applications"))
304 (hicolor (string-append out "/share/icons/hicolor")))
305 (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
306 (install-file "doc/qutebrowser.1"
307 (string-append out "/share/man/man1"))
308
309 (for-each
310 (lambda (i)
311 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
312 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
313 hicolor i i)))
314 (mkdir-p (dirname dest))
315 (copy-file src dest)))
316 '(16 24 32 48 64 128 256 512))
317 (install-file "icons/qutebrowser.svg"
318 (string-append hicolor "/scalable/apps"))
319
320 (substitute* "qutebrowser.desktop"
321 (("Exec=qutebrowser")
322 (string-append "Exec=" out "/bin/qutebrowser")))
323 (install-file "qutebrowser.desktop" app)
324 #t))))))
325 (home-page "https://qutebrowser.org/")
326 (synopsis "Minimal, keyboard-focused, vim-like web browser")
327 (description "qutebrowser is a keyboard-focused browser with a minimal
328 GUI. It is based on PyQt5 and QtWebKit.")
329 (license license:gpl3+)))
330
331 (define-public vimb
332 (package
333 (name "vimb")
334 (version "3.3.0")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "https://github.com/fanglingsu/vimb/")
340 (commit version)))
341 (sha256
342 (base32
343 "1qg18z2gnsli9qgrqfhqfrsi6g9mcgr90w8yab28nxrq4aha6brf"))
344 (file-name (git-file-name name version))))
345 (build-system glib-or-gtk-build-system)
346 (arguments
347 '(#:tests? #f ; no tests
348 #:make-flags (list "CC=gcc"
349 "DESTDIR="
350 (string-append "PREFIX=" %output))
351 #:phases
352 (modify-phases %standard-phases
353 (delete 'configure))))
354 (inputs
355 `(("glib-networking" ,glib-networking)
356 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
357 ("webkitgtk" ,webkitgtk)))
358 (native-inputs
359 `(("pkg-config" ,pkg-config)))
360 (home-page "https://fanglingsu.github.io/vimb/")
361 (synopsis "Fast and lightweight Vim-like web browser")
362 (description "Vimb is a fast and lightweight vim like web browser based on
363 the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
364 vim editor and also easily configurable during runtime. Vimb is mostly keyboard
365 driven and does not detract you from your daily work.")
366 (license license:gpl3+)))
367
368 (define-public next-gtk-webkit
369 (package
370 (name "next-gtk-webkit")
371 (version "1.2.2")
372 (source
373 (origin
374 (method git-fetch)
375 (uri (git-reference
376 (url "https://source.atlas.engineer/public/next")
377 (commit version)))
378 (sha256
379 (base32
380 "1bif1k738knhifxhkn0d2x1m521zkx40pri44vyjqncp9r95hkbk"))
381 (file-name (git-file-name "next" version))))
382 (build-system glib-or-gtk-build-system)
383 (arguments
384 `(#:tests? #f ; no tests
385 #:make-flags (list "gtk-webkit"
386 (string-append
387 "CC="
388 (assoc-ref %build-inputs "gcc-7")
389 "/bin/gcc")
390 (string-append "PREFIX=" %output))
391 #:phases
392 (modify-phases %standard-phases
393 (delete 'configure)
394 (replace 'install
395 (lambda* (#:key (make-flags '()) #:allow-other-keys)
396 (apply invoke "make" "install-gtk-webkit" make-flags))))))
397 (inputs
398 `(("glib-networking" ,glib-networking)
399 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
400 ("webkitgtk" ,webkitgtk-2.24)))
401 (native-inputs
402 `(("gcc-7" ,gcc-7) ; needed because webkitgtk-2.22 and above are compiled with gcc-7
403 ("pkg-config" ,pkg-config)))
404 (home-page "https://next.atlas.engineer")
405 (synopsis "Infinitely extensible web-browser (user interface only)")
406 (description "Next is a keyboard-oriented, extensible web-browser
407 inspired by Emacs and designed for power users. The application has familiar
408 key-bindings, is fully configurable and extensible in Lisp, and has powerful
409 features for productive professionals.")
410 (license license:bsd-3)))
411
412 (define-public sbcl-next
413 (package
414 (inherit next-gtk-webkit)
415 (name "sbcl-next")
416 (build-system asdf-build-system/sbcl)
417 (outputs '("out" "lib"))
418 (arguments
419 `(#:tests? #f ; no tests
420 #:phases (modify-phases %standard-phases
421 (add-after 'unpack 'patch-platform-port-path
422 (lambda* (#:key inputs #:allow-other-keys)
423 (substitute* "source/ports/gtk-webkit.lisp"
424 (("\"next-gtk-webkit\"")
425 (string-append "\"" (assoc-ref inputs "next-gtk-webkit")
426 "/bin/next-gtk-webkit\"")))))
427 (add-before 'cleanup 'move-bundle
428 (lambda* (#:key outputs #:allow-other-keys)
429 (define lib (assoc-ref outputs "lib"))
430 (define actual-fasl (string-append
431 lib
432 "/lib/sbcl/next.fasl"))
433 (define expected-fasl (string-append
434 lib
435 "/lib/sbcl/next--system.fasl"))
436 (copy-file actual-fasl expected-fasl)
437 #t))
438 (add-after 'create-symlinks 'build-program
439 (lambda* (#:key outputs #:allow-other-keys)
440 (build-program
441 (string-append (assoc-ref outputs "out") "/bin/next")
442 outputs
443 #:entry-program '((next:start-with-port) 0))))
444 (add-before 'build 'install-assets
445 ;; Since the ASDF build system generates a new .asd with a
446 ;; possibly suffixed and thus illegal version number, assets
447 ;; should not be installed after the 'build phase or else
448 ;; the illegal version will result in NIL in the .desktop
449 ;; file.
450 (lambda* (#:key outputs #:allow-other-keys)
451 (with-output-to-file "version"
452 (lambda _
453 (format #t "~a" ,(package-version next-gtk-webkit))))
454 (invoke "make" "install-assets"
455 (string-append "PREFIX="
456 (assoc-ref outputs "out"))))))))
457 (inputs
458 `(("next-gtk-webkit" ,next-gtk-webkit)
459 ;; Lisp libraries:
460 ("trivial-features" ,sbcl-trivial-features)
461 ("alexandria" ,sbcl-alexandria)
462 ("anaphora" ,sbcl-anaphora)
463 ("closer-mop" ,sbcl-closer-mop)
464 ("log4cl" ,sbcl-log4cl)
465 ("find-port" ,sbcl-find-port)
466 ("cl-strings" ,sbcl-cl-strings)
467 ("cl-string-match" ,sbcl-cl-string-match)
468 ("puri" ,sbcl-puri)
469 ("sqlite" ,sbcl-cl-sqlite)
470 ("parenscript" ,sbcl-parenscript)
471 ("cl-json" ,sbcl-cl-json)
472 ("swank" ,sbcl-slime-swank)
473 ("cl-markup" ,sbcl-cl-markup)
474 ("cl-css" ,sbcl-cl-css)
475 ("bordeaux-threads" ,sbcl-bordeaux-threads)
476 ("s-xml-rpc" ,sbcl-s-xml-rpc)
477 ("unix-opts" ,sbcl-unix-opts)
478 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
479 (synopsis "Infinitely extensible web-browser (with Lisp development files)")))