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>
12 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
68 (uri (string-append "http://www.dillo.org/download/"
69 name "-" version ".tar.bz2"))
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)
80 ("libxcursor" ,libxcursor)
83 ("libxinerama" ,libxinerama)
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+)))
99 (uri (string-append "http://links.twibright.com/download/"
100 "links-" version ".tar.bz2"))
103 "02ls11c02p7xvsdjyb43rrzr850i1yly003r812z0w5vv5yqqxbh"))))
104 (build-system gnu-build-system)
107 (modify-phases %standard-phases
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)))
118 (setenv "CONFIG_SHELL" (which "bash"))
119 (invoke "./configure"
120 (string-append "--prefix=" out)
123 (native-inputs `(("pkg-config" ,pkg-config)))
124 (inputs `(("zlib" ,zlib)
128 ("libevent" ,libevent)
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+)))
144 (define-public luakit
150 (uri (string-append "https://github.com/luakit/luakit/archive/" version
154 "09kgsm2w2xa4xwylsi0bwjvdl9k6hkyjyyrq2i3l8bvi2qrs5gzc"))
155 (file-name (string-append name "-" version ".tar.gz"))))
157 `(("lua-5.1" ,lua-5.1)
159 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
160 ("glib-networking" ,glib-networking)
161 ("lua5.1-filesystem" ,lua5.1-filesystem)
163 ("webkitgtk" ,webkitgtk)
166 `(("pkg-config" ,pkg-config)))
167 (build-system glib-or-gtk-build-system)
170 (let ((out (assoc-ref %outputs "out")))
174 "DEVELOPMENT_PATHS=0"
175 (string-append "PREFIX=" out)
176 (string-append "XDGPREFIX=" out "/etc/xdg")))
178 (modify-phases %standard-phases
179 (add-before 'build 'lfs-workaround
183 (assoc-ref %build-inputs "lua5.1-filesystem")
184 "/lib/lua/5.1/?.so;;"))
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")
196 (,(string-append lua5.1-filesystem
197 "/lib/lua/5.1/?.so;;")))
198 `("XDG_CONFIG_DIRS" prefix
199 (,(string-append luakit "/etc/xdg/"))))
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+)))
211 (version "2.8.9rel.1")
215 "http://invisible-mirror.net/archives/lynx/tarballs"
216 "/lynx" version ".tar.bz2"))
219 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
220 (build-system gnu-build-system)
221 (native-inputs `(("pkg-config" ,pkg-config)
223 (inputs `(("ncurses" ,ncurses)
226 ("libgcrypt" ,libgcrypt)
233 (let ((gnutls (assoc-ref %build-inputs "gnutls")))
234 `("--with-pkg-config"
235 "--with-screen=ncurses"
238 ,(string-append "--with-gnutls=" gnutls)
239 ;; "--with-socks5" ; XXX TODO
241 "--enable-ascii-ctypes"
242 "--enable-local-docs"
243 "--enable-htmlized-cfg"
247 #:tests? #f ; no check target
249 (modify-phases %standard-phases
250 (add-before 'configure 'set-makefile-shell
251 (lambda _ (substitute* "po/makefile.inn"
252 (("/bin/sh") (which "sh")))
255 (lambda* (#:key (make-flags '()) #:allow-other-keys)
256 (apply invoke "make" "install-full" make-flags)
258 (synopsis "Text Web Browser")
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
267 (home-page "https://lynx.invisible-island.net/")
268 (license license:gpl2)))
270 (define-public qutebrowser
277 (uri (string-append "https://github.com/The-Compiler/"
278 "qutebrowser/releases/download/v" version "/"
279 "qutebrowser-" version ".tar.gz"))
282 "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv"))))
283 (build-system python-build-system)
285 `(("asciidoc" ,asciidoc)))
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)))
297 `(#:tests? #f ;no tests
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"))
311 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
312 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
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"))
320 (substitute* "qutebrowser.desktop"
321 (("Exec=qutebrowser")
322 (string-append "Exec=" out "/bin/qutebrowser")))
323 (install-file "qutebrowser.desktop" app)
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+)))
339 (url "https://github.com/fanglingsu/vimb/")
343 "1qg18z2gnsli9qgrqfhqfrsi6g9mcgr90w8yab28nxrq4aha6brf"))
344 (file-name (git-file-name name version))))
345 (build-system glib-or-gtk-build-system)
347 '(#:tests? #f ; no tests
348 #:make-flags (list "CC=gcc"
350 (string-append "PREFIX=" %output))
352 (modify-phases %standard-phases
353 (delete 'configure))))
355 `(("glib-networking" ,glib-networking)
356 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
357 ("webkitgtk" ,webkitgtk)))
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+)))
368 (define-public next-gtk-webkit
370 (name "next-gtk-webkit")
376 (url "https://source.atlas.engineer/public/next")
380 "0a066f56hnb9znbwnv1blm31j0ysv05n4wzlkli0zgw087c9047x"))
381 (file-name (git-file-name "next" version))))
382 (build-system glib-or-gtk-build-system)
384 `(#:tests? #f ; no tests
385 #:make-flags (list "gtk-webkit"
388 (assoc-ref %build-inputs "gcc-7")
390 (string-append "PREFIX=" %output))
392 (modify-phases %standard-phases
395 (lambda* (#:key (make-flags '()) #:allow-other-keys)
396 (apply invoke "make" "install-gtk-webkit" make-flags))))))
398 `(("glib-networking" ,glib-networking)
399 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
400 ("webkitgtk" ,webkitgtk-2.24)))
402 `(("gcc-7" ,gcc-7) ; needed because webkitgtk-2.22 is 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)))
412 (define-public sbcl-next
414 (inherit next-gtk-webkit)
416 (build-system asdf-build-system/sbcl)
417 (outputs '("out" "lib"))
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
432 "/lib/sbcl/next.fasl"))
433 (define expected-fasl (string-append
435 "/lib/sbcl/next--system.fasl"))
436 (copy-file actual-fasl expected-fasl)
438 (add-after 'create-symlinks 'build-program
439 (lambda* (#:key outputs #:allow-other-keys)
441 (string-append (assoc-ref outputs "out") "/bin/next")
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
450 (lambda* (#:key outputs #:allow-other-keys)
451 (with-output-to-file "version"
453 (format #t "~a" ,(package-version next-gtk-webkit))))
454 (invoke "make" "install-assets"
455 (string-append "PREFIX="
456 (assoc-ref outputs "out"))))))))
458 `(("next-gtk-webkit" ,next-gtk-webkit)
460 ("trivial-features" ,sbcl-trivial-features)
461 ("alexandria" ,sbcl-alexandria)
462 ("cl-strings" ,sbcl-cl-strings)
463 ("cl-string-match" ,sbcl-cl-string-match)
465 ("sqlite" ,sbcl-cl-sqlite)
466 ("parenscript" ,sbcl-parenscript)
467 ("cl-json" ,sbcl-cl-json)
468 ("swank" ,sbcl-slime-swank)
469 ("cl-markup" ,sbcl-cl-markup)
470 ("cl-css" ,sbcl-cl-css)
471 ("bordeaux-threads" ,sbcl-bordeaux-threads)
472 ("s-xml-rpc" ,sbcl-s-xml-rpc)
473 ("unix-opts" ,sbcl-unix-opts)
474 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
475 (synopsis "Infinitely extensible web-browser (with Lisp development files)")))