1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2014, 2019 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2016, 2019 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, 2020 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 ;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
12 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
13 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
14 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
15 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages web-browsers)
33 #:use-module (guix build-system asdf)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system go)
38 #:use-module (guix build-system python)
39 #:use-module (guix download)
40 #:use-module (guix git-download)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (guix packages)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages backup)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages fltk)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gnome-xyz)
54 #:use-module (gnu packages gnupg)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages libevent)
58 #:use-module (gnu packages libidn)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages lisp)
61 #:use-module (gnu packages lisp-xyz)
62 #:use-module (gnu packages lua)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-web)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages qt)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages webkit)
73 #:use-module (gnu packages xorg))
83 (string-append "https://github.com/midori-browser/core/releases/"
84 "download/v" version "/" name "-v" version ".tar.gz"))
87 "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy"))))
88 (build-system cmake-build-system)
91 (,@%cmake-build-system-modules
92 (guix build glib-or-gtk-build-system))
94 ((guix build cmake-build-system)
95 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
98 (modify-phases %standard-phases
99 (add-after 'install 'glib-or-gtk-compile-schemas
100 (assoc-ref glib-or-gtk:%standard-phases
101 'glib-or-gtk-compile-schemas))
102 (add-after 'install 'glib-or-gtk-wrap
103 (assoc-ref glib-or-gtk:%standard-phases
104 'glib-or-gtk-wrap)))))
106 `(("glib:bin" ,glib "bin")
107 ("gtk+:bin" ,gtk+ "bin")
108 ("intltool" ,intltool)
109 ("pkg-config" ,pkg-config)))
111 `(("adwaita-icon-theme" ,adwaita-icon-theme)
114 ("glib-networking" ,glib-networking)
115 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
117 ("json-glib" ,json-glib)
118 ("libarchive" ,libarchive)
123 ("webkitgtk" ,webkitgtk)))
124 (synopsis "Lightweight graphical web browser")
125 (description "@code{Midori} is a lightweight, Webkit-based web browser.
126 It features integration with GTK+3, configurable web search engine, bookmark
127 management, extensions such as advertisement blocker and colorful tabs.")
128 (home-page "https://www.midori-browser.org")
129 (license license:lgpl2.1+)))
137 (uri (string-append "https://www.dillo.org/download/"
138 "dillo-" version ".tar.bz2"))
141 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
142 (build-system gnu-build-system)
143 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
144 (native-inputs `(("pkg-config" ,pkg-config)))
145 (inputs `(("fltk" ,fltk)
146 ("fontconfig" ,fontconfig)
147 ("libjpeg" ,libjpeg-turbo)
149 ("libxcursor" ,libxcursor)
152 ("libxinerama" ,libxinerama)
153 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
156 (synopsis "Very small and fast graphical web browser")
157 (description "Dillo is a minimalistic web browser particularly intended for
158 older or slower computers and embedded systems.")
159 (home-page "https://www.dillo.org")
160 (license license:gpl3+)))
168 (uri (string-append "http://links.twibright.com/download/"
169 "links-" version ".tar.bz2"))
172 "0qqdcghsdqm7l6kyi0k752ws3ak5crw85pqkcb11wy67j62yspi8"))))
173 (build-system gnu-build-system)
176 (modify-phases %standard-phases
178 (lambda* (#:key outputs #:allow-other-keys)
179 ;; The tarball uses a very old version of autconf. It doesn't
180 ;; understand extra flags like `--enable-fast-install', so
181 ;; we need to invoke it with just what it understands.
182 (let ((out (assoc-ref outputs "out")))
183 ;; 'configure' doesn't understand '--host'.
184 ,@(if (%current-target-system)
185 `((setenv "CHOST" ,(%current-target-system)))
187 (setenv "CONFIG_SHELL" (which "bash"))
188 (invoke "./configure"
189 (string-append "--prefix=" out)
192 (native-inputs `(("linux-libre-headers" ,linux-libre-headers)
193 ("pkg-config" ,pkg-config)))
194 (inputs `(("gpm" ,gpm)
195 ("libevent" ,libevent)
196 ("libjpeg" ,libjpeg-turbo)
202 (synopsis "Text and graphics mode web browser")
203 (description "Links is a graphics and text mode web browser, with many
204 features including, tables, builtin image display, bookmarks, SSL and more.")
205 (home-page "http://links.twibright.com")
206 ;; The distribution contains a copy of GPLv2
207 ;; However, the copyright notices simply say:
208 ;; "This file is a part of the Links program, released under GPL."
209 ;; Therefore, under the provisions of Section 9, we can choose
210 ;; any version ever published by the FSF.
211 ;; One file (https.c) contains an exception permitting
212 ;; linking of the program with openssl.
213 (license license:gpl1+)))
215 (define-public luakit
222 (url "https://github.com/luakit/luakit")
224 (file-name (git-file-name name version))
227 "0km5nxn6innzn8pfsvlkxvfj2z5g46fp6dy5bnmaklbn13mqlcrn"))))
229 `(("lua-5.1" ,lua-5.1)
231 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
232 ("glib-networking" ,glib-networking)
233 ("lua5.1-filesystem" ,lua5.1-filesystem)
235 ("webkitgtk" ,webkitgtk)
238 `(("pkg-config" ,pkg-config)))
239 (build-system glib-or-gtk-build-system)
242 (let ((out (assoc-ref %outputs "out")))
246 "DEVELOPMENT_PATHS=0"
247 (string-append "PREFIX=" out)
248 (string-append "XDGPREFIX=" out "/etc/xdg")))
250 (modify-phases %standard-phases
251 (add-before 'build 'lfs-workaround
255 (assoc-ref %build-inputs "lua5.1-filesystem")
256 "/lib/lua/5.1/?.so;;"))
260 (add-after 'install 'wrap
261 (lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((luakit (assoc-ref outputs "out"))
263 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
264 (gtk (assoc-ref inputs "gtk+"))
265 (gtk-share (string-append gtk "/share")))
266 (wrap-program (string-append luakit "/bin/luakit")
268 (,(string-append lua5.1-filesystem
269 "/lib/lua/5.1/?.so;;")))
270 `("XDG_CONFIG_DIRS" prefix
271 (,(string-append luakit "/etc/xdg/"))))
273 (synopsis "Fast, lightweight, and simple browser based on WebKit")
274 (description "Luakit is a fast, lightweight, and simple to use
275 micro-browser framework extensible by Lua using the WebKit web content engine
276 and the GTK+ toolkit.")
277 (home-page "https://luakit.github.io/")
278 (license license:gpl3+)))
283 (version "2.8.9rel.1")
287 "http://invisible-mirror.net/archives/lynx/tarballs"
288 "/lynx" version ".tar.bz2"))
291 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
292 (build-system gnu-build-system)
293 (native-inputs `(("pkg-config" ,pkg-config)
295 (inputs `(("ncurses" ,ncurses)
298 ("libgcrypt" ,libgcrypt)
305 (let ((openssl (assoc-ref %build-inputs "openssl")))
306 `("--with-pkg-config"
307 "--with-screen=ncurses"
310 ,(string-append "--with-ssl=" openssl)
311 ;; "--with-socks5" ; XXX TODO
313 "--enable-ascii-ctypes"
314 "--enable-local-docs"
315 "--enable-htmlized-cfg"
319 #:tests? #f ; no check target
321 (modify-phases %standard-phases
322 (add-before 'configure 'set-makefile-shell
323 (lambda _ (substitute* "po/makefile.inn"
324 (("/bin/sh") (which "sh")))
327 (lambda* (#:key (make-flags '()) #:allow-other-keys)
328 (apply invoke "make" "install-full" make-flags)
330 (synopsis "Text Web Browser")
332 "Lynx is a fully-featured World Wide Web (WWW) client for users running
333 cursor-addressable, character-cell display devices. It will display Hypertext
334 Markup Language (HTML) documents containing links to files on the local
335 system, as well as files on remote systems running http, gopher, ftp, wais,
336 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
337 the WWW, or to build information systems intended primarily for local
339 (home-page "https://lynx.invisible-island.net/")
340 ;; This was fixed in 2.8.9dev.10.
341 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
342 (license license:gpl2)))
344 (define-public qutebrowser
351 (uri (string-append "https://github.com/qutebrowser/"
352 "qutebrowser/releases/download/v" version "/"
353 "qutebrowser-" version ".tar.gz"))
355 (base32 "1n72dvrv4dch4i07lsis76p7g16a039fwx8rk7w8q9f60wgqb5i8"))))
356 (build-system python-build-system)
358 `(("python-attrs" ,python-attrs))) ; for tests
360 `(("python-colorama" ,python-colorama)
361 ("python-cssutils" ,python-cssutils)
362 ("python-jinja2" ,python-jinja2)
363 ("python-markupsafe" ,python-markupsafe)
364 ("python-pygments" ,python-pygments)
365 ("python-pypeg2" ,python-pypeg2)
366 ("python-pyyaml" ,python-pyyaml)
367 ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
368 ;; that it's __init__.py is used first.
369 ("python-pyqtwebengine" ,python-pyqtwebengine)
370 ("python-pyqt" ,python-pyqt)
371 ;; While qtwebengine is provided by python-pyqtwebengine, it's
372 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
373 ("qtwebengine" ,qtwebengine)))
375 `(;; FIXME: With the existance of qtwebengine, tests can now run. But
376 ;; they are still disabled because test phase hangs. It's not readily
377 ;; apparent as to why.
380 (modify-phases %standard-phases
381 (add-before 'check 'set-env-offscreen
383 (setenv "QT_QPA_PLATFORM" "offscreen")
385 (add-after 'install 'install-more
386 (lambda* (#:key outputs #:allow-other-keys)
387 (let* ((out (assoc-ref outputs "out"))
388 (app (string-append out "/share/applications"))
389 (hicolor (string-append out "/share/icons/hicolor")))
390 (install-file "doc/qutebrowser.1"
391 (string-append out "/share/man/man1"))
394 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
395 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
397 (mkdir-p (dirname dest))
398 (copy-file src dest)))
399 '(16 24 32 48 64 128 256 512))
400 (install-file "icons/qutebrowser.svg"
401 (string-append hicolor "/scalable/apps"))
402 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
403 (("Exec=qutebrowser")
404 (string-append "Exec=" out "/bin/qutebrowser")))
405 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
407 (add-after 'wrap 'wrap-qt-process-path
408 (lambda* (#:key inputs outputs #:allow-other-keys)
409 (let* ((out (assoc-ref outputs "out"))
410 (bin (string-append out "/bin/qutebrowser"))
411 (qt-process-path (string-append
412 (assoc-ref inputs "qtwebengine")
413 "/lib/qt5/libexec/QtWebEngineProcess")))
415 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
417 (home-page "https://qutebrowser.org/")
418 (synopsis "Minimal, keyboard-focused, vim-like web browser")
419 (description "qutebrowser is a keyboard-focused browser with a minimal
420 GUI. It is based on PyQt5 and QtWebEngine.")
421 (license license:gpl3+)))
431 (url "https://github.com/fanglingsu/vimb/")
434 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
435 (file-name (git-file-name name version))))
436 (build-system glib-or-gtk-build-system)
438 '(#:tests? #f ; no tests
439 #:make-flags (list "CC=gcc"
441 (string-append "PREFIX=" %output))
443 (modify-phases %standard-phases
444 (delete 'configure))))
446 `(("glib-networking" ,glib-networking)
447 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
448 ("webkitgtk" ,webkitgtk)))
450 `(("pkg-config" ,pkg-config)))
451 (home-page "https://fanglingsu.github.io/vimb/")
452 (synopsis "Fast and lightweight Vim-like web browser")
453 (description "Vimb is a fast and lightweight vim like web browser based on
454 the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
455 vim editor and also easily configurable during runtime. Vimb is mostly keyboard
456 driven and does not detract you from your daily work.")
457 (license license:gpl3+)))
462 ;; Package the pre-release because latest stable 1.5.0 does not build
464 (version "2-pre-release-1")
469 ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
470 ;; (url "https://source.atlas.engineer/public/nyxt")
471 (url "https://github.com/atlas-engineer/nyxt")
475 "0aipsmzqnlkmy001cihz2jnc0hja8c10rm08jycxr05j3gx3qsxd"))
476 (file-name (git-file-name "nyxt" version))))
477 (build-system gnu-build-system)
479 `(#:make-flags (list "nyxt" "NYXT_INTERNAL_QUICKLISP=false"
480 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
482 #:strip-binaries? #f ; Stripping breaks SBCL binaries.
484 (modify-phases %standard-phases
485 (add-after 'unpack 'patch-version ; Version is guessed from .git which Guix does not have.
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((version (format #f "~a" ,version))
488 (file "source/global.lisp"))
490 (let ((port (open-file file "a")))
491 (format port "(setf +version+ ~s)" version)
494 (add-before 'build 'make-desktop-version-number
496 (with-output-to-file "version"
498 (format #t "~a" ,version)
502 (add-before 'build 'fix-common-lisp-cache-folder
504 (setenv "HOME" "/tmp")
506 (add-after 'install 'wrap-program
507 (lambda* (#:key inputs outputs #:allow-other-keys)
508 (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
509 (glib-networking (assoc-ref inputs "glib-networking"))
510 (libs '("gsettings-desktop-schemas"))
513 (string-append (assoc-ref inputs lib) "/lib"))
516 (gi-path (string-join
518 (string-append (assoc-ref inputs lib) "/lib/girepository-1.0"))
521 (xdg-path (string-join
523 (string-append (assoc-ref inputs lib) "/share"))
527 `("GIO_EXTRA_MODULES" prefix
528 (,(string-append glib-networking "/lib/gio/modules")))
529 `("GI_TYPELIB_PATH" prefix (,gi-path))
530 `("LD_LIBRARY_PATH" ":" prefix (,path))
531 `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))
534 `(("prove" ,sbcl-prove)
537 ;; We need to avoid sbcl-* inputs (sbcl-cl-cffi-gtk in particular) as they
538 ;; seem to cause Nyxt to hang into a hogging process in about 10 minutes.
539 ;; Probably an issue between CFFI and how we build SBCL packages.
540 ;; See https://github.com/atlas-engineer/nyxt/issues/680.
541 `(("alexandria" ,cl-alexandria)
542 ("bordeaux-threads" ,cl-bordeaux-threads)
543 ("cl-containers" ,cl-containers)
546 ("cl-markup" ,cl-markup)
547 ("cl-ppcre" ,cl-ppcre)
548 ("cl-prevalence" ,cl-prevalence)
549 ("closer-mop" ,cl-closer-mop)
550 ("cluffer" ,cl-cluffer)
551 ("dexador" ,cl-dexador)
552 ("enchant" ,cl-enchant)
555 ("local-time" ,cl-local-time)
556 ("log4cl" ,cl-log4cl)
557 ("lparallel" ,cl-lparallel)
558 ("mk-string-metrics" ,cl-mk-string-metrics)
559 ("moptilities" ,cl-moptilities)
560 ("osicat" ,sbcl-osicat) ; SBCL version needed for libosicat.so.
561 ("parenscript" ,cl-parenscript)
564 ("serapeum" ,cl-serapeum)
566 ("swank" ,cl-slime-swank)
567 ("trivia" ,cl-trivia)
568 ("trivial-clipboard" ,cl-trivial-clipboard)
569 ("trivial-features" ,cl-trivial-features)
570 ("trivial-package-local-nicknames" ,cl-trivial-package-local-nicknames)
571 ("trivial-types" ,cl-trivial-types)
572 ("unix-opts" ,cl-unix-opts)
574 ("cl-cffi-gtk" ,cl-cffi-gtk)
575 ("cl-webkit" ,cl-webkit)
576 ("glib-networking" ,glib-networking)
577 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
578 (synopsis "Extensible web-browser in Common Lisp")
579 (home-page "https://nyxt.atlas.engineer")
580 (description "Nyxt is a keyboard-oriented, extensible web-browser
581 designed for power users. The application has familiar Emacs and VI
582 key-bindings and is fully configurable and extensible in Common Lisp.")
583 (license license:bsd-3)))
586 (deprecated-package "next" nyxt))
588 (define-public sbcl-next
589 (deprecated-package "sbcl-next" nyxt))
591 (define-public bombadillo
598 (url "https://tildegit.org/sloum/bombadillo")
602 "1m52b1wk48gkqmjy8l0x3jaksrx2v8w6w59lhr7zaw2i0n4f5k0z"))
603 (file-name (git-file-name name version))))
604 (build-system go-build-system)
606 `(#:import-path "tildegit.org/sloum/bombadillo"
608 #:phases (modify-phases %standard-phases
609 (add-after 'install 'install-data
610 (lambda* (#:key outputs #:allow-other-keys)
611 (let* ((builddir "src/tildegit.org/sloum/bombadillo")
612 (out (assoc-ref outputs "out"))
613 (pkg (strip-store-file-name out))
614 (sharedir (string-append out "/share"))
615 (appdir (string-append sharedir "/applications"))
616 (docdir (string-append sharedir "/doc/" pkg))
617 (mandir (string-append sharedir "/man/man1"))
618 (pixdir (string-append sharedir "/pixmaps")))
619 (with-directory-excursion builddir
620 (install-file "bombadillo.desktop" appdir)
621 (install-file "LICENSE" docdir)
622 (install-file "bombadillo.1" mandir)
623 (install-file "bombadillo-icon.png" pixdir)
625 (home-page "https://bombadillo.colorfield.space")
626 (synopsis "Terminal browser for the gopher, gemini, and finger protocols")
627 (description "Bombadillo is a non-web browser for the terminal with
628 vim-like key bindings, a document pager, configurable settings, and robust
629 command selection. The following protocols are supported as first-class
630 citizens: gopher, gemini, finger, and local. There is also support for telnet,
631 http, and https via third-party applications.")
632 (license license:gpl3+)))