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 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>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages web-browsers)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages fltk)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages gnupg)
39 #:use-module (gnu packages libevent)
40 #:use-module (gnu packages libidn)
41 #:use-module (gnu packages lisp)
42 #:use-module (gnu packages lisp-xyz)
43 #:use-module (gnu packages lua)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages python-web)
50 #:use-module (gnu packages python-xyz)
51 #:use-module (gnu packages qt)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages sqlite)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages webkit)
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages gcc)
58 #:use-module (guix download)
59 #:use-module (guix git-download)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system glib-or-gtk)
62 #:use-module (guix build-system python)
63 #:use-module (guix build-system asdf))
71 (uri (string-append "https://www.dillo.org/download/"
72 "dillo-" version ".tar.bz2"))
75 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
76 (build-system gnu-build-system)
77 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
78 (native-inputs `(("pkg-config" ,pkg-config)))
79 (inputs `(("fltk" ,fltk)
80 ("fontconfig" ,fontconfig)
83 ("libxcursor" ,libxcursor)
86 ("libxinerama" ,libxinerama)
87 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
90 (synopsis "Very small and fast graphical web browser")
91 (description "Dillo is a minimalistic web browser particularly intended for
92 older or slower computers and embedded systems.")
93 (home-page "https://www.dillo.org")
94 (license license:gpl3+)))
102 (uri (string-append "http://links.twibright.com/download/"
103 "links-" version ".tar.bz2"))
106 "097ll98ympzfx7qfdyhc52yzvsp167x5nnjs6v8ih496wv80fksb"))))
107 (build-system gnu-build-system)
110 (modify-phases %standard-phases
112 (lambda* (#:key outputs #:allow-other-keys)
113 ;; The tarball uses a very old version of autconf. It doesn't
114 ;; understand extra flags like `--enable-fast-install', so
115 ;; we need to invoke it with just what it understands.
116 (let ((out (assoc-ref outputs "out")))
117 ;; 'configure' doesn't understand '--host'.
118 ,@(if (%current-target-system)
119 `((setenv "CHOST" ,(%current-target-system)))
121 (setenv "CONFIG_SHELL" (which "bash"))
122 (invoke "./configure"
123 (string-append "--prefix=" out)
126 (native-inputs `(("pkg-config" ,pkg-config)))
127 (inputs `(("zlib" ,zlib)
131 ("libevent" ,libevent)
134 (synopsis "Text and graphics mode web browser")
135 (description "Links is a graphics and text mode web browser, with many
136 features including, tables, builtin image display, bookmarks, SSL and more.")
137 (home-page "http://links.twibright.com")
138 ;; The distribution contains a copy of GPLv2
139 ;; However, the copyright notices simply say:
140 ;; "This file is a part of the Links program, released under GPL."
141 ;; Therefore, under the provisions of Section 9, we can choose
142 ;; any version ever published by the FSF.
143 ;; One file (https.c) contains an exception permitting
144 ;; linking of the program with openssl.
145 (license license:gpl1+)))
147 (define-public luakit
154 (url "https://github.com/luakit/luakit.git")
156 (file-name (git-file-name name version))
159 "1qa90caxv1k6ak88fn0a7n7h0c4iv8szw6zn2axch8ig83i86az2"))))
161 `(("lua-5.1" ,lua-5.1)
163 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
164 ("glib-networking" ,glib-networking)
165 ("lua5.1-filesystem" ,lua5.1-filesystem)
167 ("webkitgtk" ,webkitgtk)
170 `(("pkg-config" ,pkg-config)))
171 (build-system glib-or-gtk-build-system)
174 (let ((out (assoc-ref %outputs "out")))
178 "DEVELOPMENT_PATHS=0"
179 (string-append "PREFIX=" out)
180 (string-append "XDGPREFIX=" out "/etc/xdg")))
182 (modify-phases %standard-phases
183 (add-before 'build 'lfs-workaround
187 (assoc-ref %build-inputs "lua5.1-filesystem")
188 "/lib/lua/5.1/?.so;;"))
192 (add-after 'install 'wrap
193 (lambda* (#:key inputs outputs #:allow-other-keys)
194 (let* ((luakit (assoc-ref outputs "out"))
195 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
196 (gtk (assoc-ref inputs "gtk+"))
197 (gtk-share (string-append gtk "/share")))
198 (wrap-program (string-append luakit "/bin/luakit")
200 (,(string-append lua5.1-filesystem
201 "/lib/lua/5.1/?.so;;")))
202 `("XDG_CONFIG_DIRS" prefix
203 (,(string-append luakit "/etc/xdg/"))))
205 (synopsis "Fast, lightweight, and simple browser based on WebKit")
206 (description "Luakit is a fast, lightweight, and simple to use
207 micro-browser framework extensible by Lua using the WebKit web content engine
208 and the GTK+ toolkit.")
209 (home-page "https://luakit.github.io/")
210 (license license:gpl3+)))
215 (version "2.8.9rel.1")
219 "http://invisible-mirror.net/archives/lynx/tarballs"
220 "/lynx" version ".tar.bz2"))
223 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
224 (build-system gnu-build-system)
225 (native-inputs `(("pkg-config" ,pkg-config)
227 (inputs `(("ncurses" ,ncurses)
230 ("libgcrypt" ,libgcrypt)
237 (let ((openssl (assoc-ref %build-inputs "openssl")))
238 `("--with-pkg-config"
239 "--with-screen=ncurses"
242 ,(string-append "--with-ssl=" openssl)
243 ;; "--with-socks5" ; XXX TODO
245 "--enable-ascii-ctypes"
246 "--enable-local-docs"
247 "--enable-htmlized-cfg"
251 #:tests? #f ; no check target
253 (modify-phases %standard-phases
254 (add-before 'configure 'set-makefile-shell
255 (lambda _ (substitute* "po/makefile.inn"
256 (("/bin/sh") (which "sh")))
259 (lambda* (#:key (make-flags '()) #:allow-other-keys)
260 (apply invoke "make" "install-full" make-flags)
262 (synopsis "Text Web Browser")
264 "Lynx is a fully-featured World Wide Web (WWW) client for users running
265 cursor-addressable, character-cell display devices. It will display Hypertext
266 Markup Language (HTML) documents containing links to files on the local
267 system, as well as files on remote systems running http, gopher, ftp, wais,
268 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
269 the WWW, or to build information systems intended primarily for local
271 (home-page "https://lynx.invisible-island.net/")
272 ;; This was fixed in 2.8.9dev.10.
273 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
274 (license license:gpl2)))
276 (define-public qutebrowser
283 (uri (string-append "https://github.com/qutebrowser/"
284 "qutebrowser/releases/download/v" version "/"
285 "qutebrowser-" version ".tar.gz"))
288 "1prvd3cysmcjfybn0dmr3ih0bl6lm5ml9i7wd09fn8hb7047mkby"))))
289 (build-system python-build-system)
291 `(("python-attrs" ,python-attrs))) ; for tests
293 `(("python-colorama" ,python-colorama)
294 ("python-cssutils" ,python-cssutils)
295 ("python-jinja2" ,python-jinja2)
296 ("python-markupsafe" ,python-markupsafe)
297 ("python-pygments" ,python-pygments)
298 ("python-pypeg2" ,python-pypeg2)
299 ("python-pyyaml" ,python-pyyaml)
300 ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
301 ;; that it's __init__.py is used first.
302 ("python-pyqtwebengine" ,python-pyqtwebengine)
303 ("python-pyqt" ,python-pyqt)
304 ;; While qtwebengine is provided by python-pyqtwebengine, it's
305 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
306 ("qtwebengine" ,qtwebengine)))
308 `(;; FIXME: With the existance of qtwebengine, tests can now run. But
309 ;; they are still disabled because test phase hangs. It's not readily
310 ;; apparent as to why.
313 (modify-phases %standard-phases
314 (add-before 'check 'set-env-offscreen
316 (setenv "QT_QPA_PLATFORM" "offscreen")
318 (add-after 'install 'install-more
319 (lambda* (#:key outputs #:allow-other-keys)
320 (let* ((out (assoc-ref outputs "out"))
321 (app (string-append out "/share/applications"))
322 (hicolor (string-append out "/share/icons/hicolor")))
323 (install-file "doc/qutebrowser.1"
324 (string-append out "/share/man/man1"))
327 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
328 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
330 (mkdir-p (dirname dest))
331 (copy-file src dest)))
332 '(16 24 32 48 64 128 256 512))
333 (install-file "icons/qutebrowser.svg"
334 (string-append hicolor "/scalable/apps"))
335 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
336 (("Exec=qutebrowser")
337 (string-append "Exec=" out "/bin/qutebrowser")))
338 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
340 (add-after 'wrap 'wrap-qt-process-path
341 (lambda* (#:key inputs outputs #:allow-other-keys)
342 (let* ((out (assoc-ref outputs "out"))
343 (bin (string-append out "/bin/qutebrowser"))
344 (qt-process-path (string-append
345 (assoc-ref inputs "qtwebengine")
346 "/lib/qt5/libexec/QtWebEngineProcess")))
348 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
350 (home-page "https://qutebrowser.org/")
351 (synopsis "Minimal, keyboard-focused, vim-like web browser")
352 (description "qutebrowser is a keyboard-focused browser with a minimal
353 GUI. It is based on PyQt5 and QtWebEngine.")
354 (license license:gpl3+)))
364 (url "https://github.com/fanglingsu/vimb/")
367 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
368 (file-name (git-file-name name version))))
369 (build-system glib-or-gtk-build-system)
371 '(#:tests? #f ; no tests
372 #:make-flags (list "CC=gcc"
374 (string-append "PREFIX=" %output))
376 (modify-phases %standard-phases
377 (delete 'configure))))
379 `(("glib-networking" ,glib-networking)
380 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
381 ("webkitgtk" ,webkitgtk)))
383 `(("pkg-config" ,pkg-config)))
384 (home-page "https://fanglingsu.github.io/vimb/")
385 (synopsis "Fast and lightweight Vim-like web browser")
386 (description "Vimb is a fast and lightweight vim like web browser based on
387 the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
388 vim editor and also easily configurable during runtime. Vimb is mostly keyboard
389 driven and does not detract you from your daily work.")
390 (license license:gpl3+)))
392 (define next-gtk-webkit
394 (name "next-gtk-webkit")
400 ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
401 ;; (url "https://source.atlas.engineer/public/next")
402 (url "https://github.com/atlas-engineer/next")
406 "1gkmr746rqqg94698a051gv79fblc8n9dq0zg04llba44adhpmjl"))
407 (file-name (git-file-name "next" version))))
408 (build-system glib-or-gtk-build-system)
410 `(#:tests? #f ; no tests
411 #:make-flags (list "gtk-webkit"
413 (string-append "PREFIX=" %output))
415 (modify-phases %standard-phases
418 (lambda* (#:key (make-flags '()) #:allow-other-keys)
419 (apply invoke "make" "install-gtk-webkit" make-flags))))))
421 `(("glib-networking" ,glib-networking)
422 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
423 ("webkitgtk" ,webkitgtk)))
425 `(("pkg-config" ,pkg-config)))
426 (home-page "https://next.atlas.engineer")
427 (synopsis "Infinitely extensible web-browser (user interface only)")
428 (description "Next is a keyboard-oriented, extensible web-browser
429 inspired by Emacs and designed for power users. The application has familiar
430 key-bindings, is fully configurable and extensible in Lisp, and has powerful
431 features for productive professionals.")
432 (license license:bsd-3)))
434 (define sbcl-next-download-manager
436 (inherit next-gtk-webkit)
437 (name "sbcl-next-download-manager")
438 (build-system asdf-build-system/sbcl)
440 `(#:tests? #f ; Need online access.
441 #:asd-file "next.asd"
442 #:asd-system-name "next/download-manager"))
444 `(("cl-ppcre" ,sbcl-cl-ppcre)
445 ("dexador" ,sbcl-dexador)
446 ("log4cl" ,sbcl-log4cl)
447 ("lparallel" ,sbcl-lparallel)
449 ("str" ,sbcl-cl-str)))
451 `(("trivial-features" ,sbcl-trivial-features)
452 ("prove-asdf" ,sbcl-prove-asdf)))
453 (synopsis "Infinitely extensible web-browser (download manager)")))
455 (define sbcl-next-ring
457 (inherit next-gtk-webkit)
458 (name "sbcl-next-ring")
459 (build-system asdf-build-system/sbcl)
462 #:asd-file "next.asd"
463 #:asd-system-name "next/ring"))
465 `(("trivial-features" ,sbcl-trivial-features)
466 ("prove-asdf" ,sbcl-prove-asdf)))
467 (synopsis "Infinitely extensible web-browser (ring)")))
469 (define sbcl-next-history-tree
471 (inherit next-gtk-webkit)
472 (name "sbcl-next-history-tree")
473 (build-system asdf-build-system/sbcl)
476 #:asd-file "next.asd"
477 #:asd-system-name "next/history-tree"))
479 `(("trivial-features" ,sbcl-trivial-features)
480 ("prove-asdf" ,sbcl-prove-asdf)))
481 (synopsis "Infinitely extensible web-browser (history-tree)")))
483 (define sbcl-next-password-manager
485 (inherit next-gtk-webkit)
486 (name "sbcl-next-password-manager")
487 (build-system asdf-build-system/sbcl)
490 #:asd-file "next.asd"
491 #:asd-system-name "next/password-manager"))
493 `(("bordeaux-threads" ,sbcl-bordeaux-threads)
494 ("cl-annot" ,sbcl-cl-annot)
495 ("cl-ppcre" ,sbcl-cl-ppcre)
497 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
499 `(("trivial-features" ,sbcl-trivial-features)
500 ("prove-asdf" ,sbcl-prove-asdf)))
501 (synopsis "Infinitely extensible web-browser (password manager)")))
503 (define sbcl-next-hooks
505 (inherit next-gtk-webkit)
506 (name "sbcl-next-hooks")
507 (build-system asdf-build-system/sbcl)
510 #:asd-file "next.asd"
511 #:asd-system-name "next/hooks"))
513 `(("alexandria" ,sbcl-alexandria)
514 ("serapeum" ,sbcl-serapeum)))
516 `(("trivial-features" ,sbcl-trivial-features)
517 ("prove-asdf" ,sbcl-prove-asdf)))
518 (synopsis "Infinitely extensible web-browser (hooks)")))
521 (let ((version (package-version next-gtk-webkit)))
523 (inherit next-gtk-webkit)
525 (build-system asdf-build-system/sbcl)
526 (outputs '("out" "lib"))
528 `(#:tests? #f ; no tests
529 #:asd-system-name "next"
530 #:phases (modify-phases %standard-phases
531 (add-after 'unpack 'patch-platform-port-path
532 (lambda* (#:key inputs #:allow-other-keys)
533 (substitute* "source/ports/gtk-webkit.lisp"
534 (("\"next-gtk-webkit\"")
535 (string-append "\"" (assoc-ref inputs "next-gtk-webkit")
536 "/bin/next-gtk-webkit\"")))
538 (add-after 'patch-platform-port-path 'patch-version
539 ;; When the version is not just dot-separated numerals
540 ;; (e.g. a git-commit version), Guix modifies the .asd with
541 ;; an illegal version number, and then Next fails to query
542 ;; it. So we hard-code it here.
543 (lambda* (#:key inputs #:allow-other-keys)
544 (let ((version (format #f "~a" ,version)))
545 (substitute* "source/global.lisp"
546 (("version\\)\\)\\)")
547 (string-append "version)))
548 (setf +version+ \"" version "\")"))))
550 (add-before 'cleanup 'move-bundle
551 (lambda* (#:key outputs #:allow-other-keys)
552 (define lib (assoc-ref outputs "lib"))
553 (define actual-fasl (string-append
555 "/lib/sbcl/next.fasl"))
556 (define expected-fasl (string-append
558 "/lib/sbcl/next--system.fasl"))
559 (copy-file actual-fasl expected-fasl)
561 (add-after 'create-symlinks 'build-program
562 (lambda* (#:key outputs #:allow-other-keys)
564 (string-append (assoc-ref outputs "out") "/bin/next")
566 #:entry-program '((next:entry-point) 0))))
567 (add-before 'build 'install-assets
568 ;; Since the ASDF build system generates a new .asd with a
569 ;; possibly suffixed and thus illegal version number, assets
570 ;; should not be installed after the 'build phase or else
571 ;; the illegal version will result in NIL in the .desktop
573 (lambda* (#:key outputs #:allow-other-keys)
574 (with-output-to-file "version"
576 (format #t "~a" ,(package-version next-gtk-webkit))))
577 (invoke "make" "install-assets"
578 (string-append "PREFIX="
579 (assoc-ref outputs "out"))))))))
581 `(("alexandria" ,sbcl-alexandria)
582 ("bordeaux-threads" ,sbcl-bordeaux-threads)
583 ("cl-annot" ,sbcl-cl-annot)
584 ("cl-ansi-text" ,sbcl-cl-ansi-text)
585 ("cl-css" ,sbcl-cl-css)
586 ("cl-json" ,sbcl-cl-json)
587 ("cl-markup" ,sbcl-cl-markup)
588 ("cl-ppcre" ,sbcl-cl-ppcre)
589 ("cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode)
590 ("cl-prevalence" ,sbcl-cl-prevalence)
591 ("closer-mop" ,sbcl-closer-mop)
593 ("dexador" ,sbcl-dexador)
594 ("ironclad" ,sbcl-ironclad)
595 ("local-time" ,sbcl-local-time)
596 ("log4cl" ,sbcl-log4cl)
597 ("lparallel" ,sbcl-lparallel)
598 ("mk-string-metrics" ,sbcl-mk-string-metrics)
599 ("parenscript" ,sbcl-parenscript)
600 ("plump" ,sbcl-plump)
602 ("serapeum" ,sbcl-serapeum)
603 ("sqlite" ,sbcl-cl-sqlite)
605 ("swank" ,sbcl-slime-swank)
606 ("trivia" ,sbcl-trivia)
607 ("trivial-clipboard" ,sbcl-trivial-clipboard)
608 ("unix-opts" ,sbcl-unix-opts)
610 ("next-gtk-webkit" ,next-gtk-webkit)
611 ("next-download-manager" ,sbcl-next-download-manager)
612 ("next-ring" ,sbcl-next-ring)
613 ("next-history-tree" ,sbcl-next-history-tree)
614 ("next-password-manager" ,sbcl-next-password-manager)
615 ("next-hooks" ,sbcl-next-hooks)))
617 `(("trivial-features" ,sbcl-trivial-features)
618 ("trivial-types" ,sbcl-trivial-types)
619 ("prove-asdf" ,sbcl-prove-asdf)))
620 (synopsis "Infinitely extensible web-browser (with Lisp development files)"))))
622 (define-public sbcl-next
623 (deprecated-package "sbcl-next" next))