guix: qt-build-system, qt-utils: Unify wrapping of qt-programs.
[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, 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–2021 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>
16 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
17 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
18 ;;; Copyright © 2021 Cage <cage-dev@twistfold.it>
19 ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
20 ;;; Copyright © 2021 Alexander Krotov <krotov@iitp.ru>
21 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages web-browsers)
39 #:use-module (guix build-system asdf)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system glib-or-gtk)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system go)
44 #:use-module (guix build-system python)
45 #:use-module (guix download)
46 #:use-module (guix git-download)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix packages)
49 #:use-module (guix utils)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages backup)
53 #:use-module (gnu packages bison)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages fltk)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages fonts)
60 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages gettext)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages gnome-xyz)
66 #:use-module (gnu packages gnupg)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages libevent)
70 #:use-module (gnu packages libidn)
71 #:use-module (gnu packages libunistring)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages lisp)
74 #:use-module (gnu packages lisp-xyz)
75 #:use-module (gnu packages lua)
76 #:use-module (gnu packages man)
77 #:use-module (gnu packages markup)
78 #:use-module (gnu packages mp3)
79 #:use-module (gnu packages nano)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages python)
85 #:use-module (gnu packages python-web)
86 #:use-module (gnu packages python-xyz)
87 #:use-module (gnu packages qt)
88 #:use-module (gnu packages sdl)
89 #:use-module (gnu packages sqlite)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages webkit)
92 #:use-module (gnu packages xorg))
93
94 (define-public midori
95 (package
96 (name "midori")
97 (version "9.0")
98 (source
99 (origin
100 (method url-fetch)
101 (uri
102 (string-append "https://github.com/midori-browser/core/releases/"
103 "download/v" version "/" name "-v" version ".tar.gz"))
104 (sha256
105 (base32
106 "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy"))))
107 (build-system cmake-build-system)
108 (arguments
109 `(#:imported-modules
110 (,@%cmake-build-system-modules
111 (guix build glib-or-gtk-build-system))
112 #:modules
113 ((guix build cmake-build-system)
114 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
115 (guix build utils))
116 #:phases
117 (modify-phases %standard-phases
118 (add-after 'install 'glib-or-gtk-compile-schemas
119 (assoc-ref glib-or-gtk:%standard-phases
120 'glib-or-gtk-compile-schemas))
121 (add-after 'install 'glib-or-gtk-wrap
122 (assoc-ref glib-or-gtk:%standard-phases
123 'glib-or-gtk-wrap)))))
124 (native-inputs
125 `(("glib:bin" ,glib "bin")
126 ("gtk+:bin" ,gtk+ "bin")
127 ("intltool" ,intltool)
128 ("pkg-config" ,pkg-config)))
129 (inputs
130 `(("adwaita-icon-theme" ,adwaita-icon-theme)
131 ("gcr" ,gcr)
132 ("glib" ,glib)
133 ("glib-networking" ,glib-networking)
134 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
135 ("gtk+" ,gtk+)
136 ("json-glib" ,json-glib)
137 ("libarchive" ,libarchive)
138 ("libpeas" ,libpeas)
139 ("libsoup" ,libsoup)
140 ("sqlite" ,sqlite)
141 ("vala" ,vala)
142 ("webkitgtk" ,webkitgtk)))
143 (synopsis "Lightweight graphical web browser")
144 (description "@code{Midori} is a lightweight, Webkit-based web browser.
145 It features integration with GTK+3, configurable web search engine, bookmark
146 management, extensions such as advertisement blocker and colorful tabs.")
147 (home-page "https://www.midori-browser.org")
148 (license license:lgpl2.1+)))
149
150 (define-public dillo
151 (package
152 (name "dillo")
153 (version "3.0.5")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "https://www.dillo.org/download/"
157 "dillo-" version ".tar.bz2"))
158 (sha256
159 (base32
160 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
161 (build-system gnu-build-system)
162 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
163 (native-inputs `(("pkg-config" ,pkg-config)))
164 (inputs `(("fltk" ,fltk)
165 ("fontconfig" ,fontconfig)
166 ("libjpeg" ,libjpeg-turbo)
167 ("libpng" ,libpng)
168 ("libxcursor" ,libxcursor)
169 ("libxft" ,libxft)
170 ("libxi" ,libxi)
171 ("libxinerama" ,libxinerama)
172 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
173 ("perl" ,perl)
174 ("zlib" ,zlib)))
175 (synopsis "Very small and fast graphical web browser")
176 (description "Dillo is a minimalistic web browser particularly intended for
177 older or slower computers and embedded systems.")
178 (home-page "https://www.dillo.org")
179 (license license:gpl3+)))
180
181 (define-public links
182 (package
183 (name "links")
184 (version "2.23")
185 (source (origin
186 (method url-fetch)
187 (uri (string-append "http://links.twibright.com/download/"
188 "links-" version ".tar.bz2"))
189 (sha256
190 (base32
191 "0idcwryfbf6ds5x2fx1k21m459qz5mrz3hw4a6ziiz91yl1d4q36"))))
192 (build-system gnu-build-system)
193 (arguments
194 `(#:phases
195 (modify-phases %standard-phases
196 (replace 'configure
197 (lambda* (#:key outputs #:allow-other-keys)
198 ;; The tarball uses a very old version of autconf. It doesn't
199 ;; understand extra flags like `--enable-fast-install', so
200 ;; we need to invoke it with just what it understands.
201 (let ((out (assoc-ref outputs "out")))
202 ;; 'configure' doesn't understand '--host'.
203 ,@(if (%current-target-system)
204 `((setenv "CHOST" ,(%current-target-system)))
205 '())
206 (setenv "CONFIG_SHELL" (which "bash"))
207 (invoke "./configure"
208 (string-append "--prefix=" out)
209 "--enable-graphics")
210 #t))))))
211 (native-inputs `(("linux-libre-headers" ,linux-libre-headers)
212 ("pkg-config" ,pkg-config)))
213 (inputs `(("gpm" ,gpm)
214 ("libevent" ,libevent)
215 ("libjpeg" ,libjpeg-turbo)
216 ("libpng" ,libpng)
217 ("libtiff" ,libtiff)
218 ("libxt" ,libxt)
219 ("openssl" ,openssl)
220 ("zlib" ,zlib)))
221 (synopsis "Text and graphics mode web browser")
222 (description "Links is a graphics and text mode web browser, with many
223 features including, tables, builtin image display, bookmarks, SSL and more.")
224 (home-page "http://links.twibright.com")
225 ;; The distribution contains a copy of GPLv2
226 ;; However, the copyright notices simply say:
227 ;; "This file is a part of the Links program, released under GPL."
228 ;; Therefore, under the provisions of Section 9, we can choose
229 ;; any version ever published by the FSF.
230 ;; One file (https.c) contains an exception permitting
231 ;; linking of the program with openssl.
232 (license license:gpl1+)))
233
234 (define-public luakit
235 (package
236 (name "luakit")
237 (version "2.3")
238 (source (origin
239 (method git-fetch)
240 (uri (git-reference
241 (url "https://github.com/luakit/luakit")
242 (commit version)))
243 (file-name (git-file-name name version))
244 (sha256
245 (base32
246 "1khbn7dpizkznnwkw7rcfhf72dnd1nazk7dwb4rkh9i97b53mf1y"))))
247 (inputs
248 `(("lua-5.1" ,lua-5.1)
249 ("gtk+" ,gtk+)
250 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
251 ("glib-networking" ,glib-networking)
252 ("lua5.1-filesystem" ,lua5.1-filesystem)
253 ("luajit" ,luajit)
254 ("webkitgtk" ,webkitgtk)
255 ("sqlite" ,sqlite)))
256 (native-inputs
257 `(("pkg-config" ,pkg-config)))
258 (build-system glib-or-gtk-build-system)
259 (arguments
260 `(#:make-flags
261 (let ((out (assoc-ref %outputs "out")))
262 (list
263 "CC=gcc"
264 "LUA_BIN_NAME=lua"
265 "DEVELOPMENT_PATHS=0"
266 (string-append "PREFIX=" out)
267 (string-append "XDGPREFIX=" out "/etc/xdg")))
268 #:phases
269 (modify-phases %standard-phases
270 (add-before 'build 'lfs-workaround
271 (lambda _
272 (setenv "LUA_CPATH"
273 (string-append
274 (assoc-ref %build-inputs "lua5.1-filesystem")
275 "/lib/lua/5.1/?.so;;"))
276 #t))
277 (add-before 'build 'set-version
278 (lambda _
279 (setenv "VERSION_FROM_GIT" ,(package-version this-package))
280 #t))
281 (delete 'configure)
282 (delete 'check)
283 (add-after 'install 'wrap
284 (lambda* (#:key inputs outputs #:allow-other-keys)
285 (let* ((luakit (assoc-ref outputs "out"))
286 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
287 (gtk (assoc-ref inputs "gtk+"))
288 (gtk-share (string-append gtk "/share")))
289 (wrap-program (string-append luakit "/bin/luakit")
290 `("LUA_CPATH" prefix
291 (,(string-append lua5.1-filesystem
292 "/lib/lua/5.1/?.so;;")))
293 `("XDG_CONFIG_DIRS" prefix
294 (,(string-append luakit "/etc/xdg/"))))
295 #t))))))
296 (synopsis "Fast, lightweight, and simple browser based on WebKit")
297 (description "Luakit is a fast, lightweight, and simple to use
298 micro-browser framework extensible by Lua using the WebKit web content engine
299 and the GTK+ toolkit.")
300 (home-page "https://luakit.github.io/")
301 (license license:gpl3+)))
302
303 (define-public lynx
304 (package
305 (name "lynx")
306 (version "2.9.0dev.6")
307 (source (origin
308 (method url-fetch)
309 (uri (string-append
310 "http://invisible-mirror.net/archives/lynx/tarballs"
311 "/lynx" version ".tar.bz2"))
312 (sha256
313 (base32
314 "1cjkpwxc1r8x8q73bgh9a4skaph1bwa0anml6f6lvf7lh5zvxw3q"))))
315 (build-system gnu-build-system)
316 (native-inputs `(("pkg-config" ,pkg-config)
317 ("perl" ,perl)))
318 (inputs `(("ncurses" ,ncurses)
319 ("libidn" ,libidn)
320 ("openssl" ,openssl)
321 ("libgcrypt" ,libgcrypt)
322 ("unzip" ,unzip)
323 ("zlib" ,zlib)
324 ("gzip" ,gzip)
325 ("bzip2" ,bzip2)))
326 (arguments
327 `(#:configure-flags
328 (let ((openssl (assoc-ref %build-inputs "openssl")))
329 `("--with-pkg-config"
330 "--with-screen=ncurses"
331 "--with-zlib"
332 "--with-bzlib"
333 ,(string-append "--with-ssl=" openssl)
334 ;; "--with-socks5" ; XXX TODO
335 "--enable-widec"
336 "--enable-ascii-ctypes"
337 "--enable-local-docs"
338 "--enable-htmlized-cfg"
339 "--enable-gzip-help"
340 "--enable-nls"
341 "--enable-ipv6"))
342 #:tests? #f ; no check target
343 #:phases
344 (modify-phases %standard-phases
345 (add-before 'configure 'set-makefile-shell
346 (lambda _ (substitute* "po/makefile.inn"
347 (("/bin/sh") (which "sh")))
348 #t))
349 (replace 'install
350 (lambda* (#:key (make-flags '()) #:allow-other-keys)
351 (apply invoke "make" "install-full" make-flags)
352 #t)))))
353 (synopsis "Text Web Browser")
354 (description
355 "Lynx is a fully-featured World Wide Web (WWW) client for users running
356 cursor-addressable, character-cell display devices. It will display Hypertext
357 Markup Language (HTML) documents containing links to files on the local
358 system, as well as files on remote systems running http, gopher, ftp, wais,
359 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
360 the WWW, or to build information systems intended primarily for local
361 access.")
362 (home-page "https://lynx.invisible-island.net/")
363 ;; This was fixed in 2.8.9dev.10.
364 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
365 (license license:gpl2)))
366
367 (define-public kristall
368 ;; Fixes to the build system applied after the latest tag
369 ;; Use tagged release when updating
370 (let ((commit "204b08a9303e75cd8d4c252b0554935062766f86")
371 (revision "1"))
372 (package
373 (name "kristall")
374 (version (string-append "0.3-" revision "." (string-take commit 7)))
375 (source
376 (origin
377 (method git-fetch)
378 (uri (git-reference
379 (url "https://github.com/MasterQ32/kristall")
380 (commit commit)))
381 (file-name (git-file-name name version))
382 (sha256
383 (base32
384 "1mymq0dh6r0829x74j0jkw8hw46amqwbznlf1b4ra6w77h9yz3lj"))
385 (modules '((srfi srfi-1)
386 (ice-9 ftw)
387 (guix build utils)))
388 (snippet
389 '(let ((preserved-lib-files '("luis-l-gist")))
390 (with-directory-excursion "lib"
391 (for-each
392 (lambda (directory)
393 (simple-format #t "deleting: ~A\n" directory)
394 (delete-file-recursively directory))
395 (lset-difference string=?
396 (scandir ".")
397 (cons* "." ".." preserved-lib-files))))
398 ;; Contains executable of 7z and pscp
399 (delete-file-recursively "ci/tools")
400 ;; Remove bundled fonts
401 (delete-file-recursively "src/fonts")
402 #t))))
403 (build-system gnu-build-system)
404 (arguments
405 `(#:modules ((guix build gnu-build-system)
406 (guix build qt-utils)
407 (guix build utils))
408 #:imported-modules (,@%gnu-build-system-modules
409 (guix build qt-utils))
410 #:make-flags
411 (list (string-append "PREFIX=" %output))
412 #:phases
413 (modify-phases %standard-phases
414 (delete 'configure) ; no ./configure script
415 (delete 'check) ; no check target
416 (add-before 'build 'set-program-version
417 (lambda _
418 ;; configure.ac relies on ‘git --describe’ to get the version.
419 ;; Patch it to just return the real version number directly.
420 (substitute* "src/kristall.pro"
421 (("(KRISTALL_VERSION=).*" _ match)
422 (string-append match ,version "\n")))
423 #t))
424 (add-before 'build 'dont-use-bundled-cmark
425 (lambda _
426 (substitute* "src/kristall.pro"
427 (("(^include\\(.*cmark.*)" _ match)
428 (string-append
429 "LIBS += -I" (assoc-ref %build-inputs "cmark") " -lcmark")))
430 #t))
431 (add-before 'build 'dont-use-bundled-breeze-stylesheet
432 (lambda _
433 (substitute* "src/kristall.pro"
434 (("../lib/BreezeStyleSheets/breeze.qrc")
435 (string-append
436 (assoc-ref %build-inputs "breeze-stylesheet") "/breeze.qrc")))
437 #t))
438 (add-before 'build 'dont-use-bundled-fonts
439 (lambda _
440 (substitute* "src/kristall.pro"
441 ((".*fonts.qrc.*") ""))
442 (substitute* "src/main.cpp"
443 (("/fonts/OpenMoji-Color")
444 (string-append
445 (assoc-ref %build-inputs "font-openmoji")
446 "/share/fonts/truetype/OpenMoji-Color"))
447 (("/fonts/NotoColorEmoji")
448 (string-append
449 (assoc-ref %build-inputs "font-google-noto")
450 "/share/fonts/truetype/NotoColorEmoji")))
451 #t))
452 (add-after 'install 'wrap-program
453 (lambda* (#:key outputs inputs #:allow-other-keys)
454 (let ((out (assoc-ref outputs "out")))
455 (wrap-qt-program "kristall" #:output out #:inputs inputs))
456 #t)))))
457 (native-inputs
458 `(("breeze-stylesheet"
459 ,(let ((commit "2d595a956f8a5f493aa51139a470b768a6d82cce")
460 (revision "0"))
461 (origin
462 (method git-fetch)
463 (uri
464 (git-reference
465 (url "https://github.com/Alexhuszagh/BreezeStyleSheets")
466 (commit "2d595a956f8a5f493aa51139a470b768a6d82cce")))
467 (file-name (git-file-name "breeze-stylesheet"
468 (git-version "0" revision commit)))
469 (sha256
470 (base32
471 "1kvkxkisi3czldnb43ig60l55pi4a3m2a4ixp7krhpf9fc5wp294")))))))
472 (inputs
473 `(("cmark" ,cmark)
474 ("font-google-noto" ,font-google-noto)
475 ("font-openmoji" ,font-openmoji)
476 ("openssl" ,openssl)
477 ("qtbase" ,qtbase-5)
478 ("qtmultimedia" ,qtmultimedia)
479 ("qtsvg" ,qtsvg)))
480 (home-page "https://kristall.random-projects.net")
481 (synopsis "Small-internet graphical client")
482 (description "Graphical small-internet client with with many features
483 including multi-protocol support (gemini, HTTP, HTTPS, gopher, finger),
484 bookmarks, TSL certificates management, outline generation and a tabbed
485 interface.")
486 (license (list license:gpl3+
487 ;; for breeze-stylesheet
488 license:expat)))))
489
490 (define-public qutebrowser
491 (package
492 (name "qutebrowser")
493 (version "2.2.2")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append "https://github.com/qutebrowser/"
498 "qutebrowser/releases/download/v" version "/"
499 "qutebrowser-" version ".tar.gz"))
500 (sha256
501 (base32 "11vjp20gzmdjj09b7wxzn7ar6viih0bk76y618yqsyqqkffylmbq"))))
502 (build-system python-build-system)
503 (native-inputs
504 `(("python-attrs" ,python-attrs))) ; for tests
505 (inputs
506 `(("python-colorama" ,python-colorama)
507 ("python-cssutils" ,python-cssutils)
508 ("python-importlib-resources" ,python-importlib-resources)
509 ("python-jinja2" ,python-jinja2)
510 ("python-markupsafe" ,python-markupsafe)
511 ("python-pygments" ,python-pygments)
512 ("python-pypeg2" ,python-pypeg2)
513 ("python-pyyaml" ,python-pyyaml)
514 ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
515 ;; that it's __init__.py is used first.
516 ("python-pyqtwebengine" ,python-pyqtwebengine)
517 ("python-pyqt" ,python-pyqt)
518 ;; While qtwebengine is provided by python-pyqtwebengine, it's
519 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
520 ("qtwebengine" ,qtwebengine)))
521 (arguments
522 `(;; FIXME: With the existance of qtwebengine, tests can now run. But
523 ;; they are still disabled because test phase hangs. It's not readily
524 ;; apparent as to why.
525 #:tests? #f
526 #:phases
527 (modify-phases %standard-phases
528 (add-before 'check 'set-env-offscreen
529 (lambda _
530 (setenv "QT_QPA_PLATFORM" "offscreen")
531 #t))
532 (add-after 'install 'install-more
533 (lambda* (#:key outputs #:allow-other-keys)
534 (let* ((out (assoc-ref outputs "out"))
535 (app (string-append out "/share/applications"))
536 (hicolor (string-append out "/share/icons/hicolor")))
537 (install-file "doc/qutebrowser.1"
538 (string-append out "/share/man/man1"))
539 (for-each
540 (lambda (i)
541 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
542 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
543 hicolor i i)))
544 (mkdir-p (dirname dest))
545 (copy-file src dest)))
546 '(16 24 32 48 64 128 256 512))
547 (install-file "icons/qutebrowser.svg"
548 (string-append hicolor "/scalable/apps"))
549 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
550 (("Exec=qutebrowser")
551 (string-append "Exec=" out "/bin/qutebrowser")))
552 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
553 #t)))
554 (add-after 'wrap 'wrap-qt-process-path
555 (lambda* (#:key inputs outputs #:allow-other-keys)
556 (let* ((out (assoc-ref outputs "out"))
557 (bin (string-append out "/bin/qutebrowser"))
558 (qt-process-path (string-append
559 (assoc-ref inputs "qtwebengine")
560 "/lib/qt5/libexec/QtWebEngineProcess")))
561 (wrap-program bin
562 `("QTWEBENGINEPROCESS_PATH" = (,qt-process-path)))
563 #t))))))
564 (home-page "https://qutebrowser.org/")
565 (synopsis "Minimal, keyboard-focused, vim-like web browser")
566 (description "qutebrowser is a keyboard-focused browser with a minimal
567 GUI. It is based on PyQt5 and QtWebEngine.")
568 (license license:gpl3+)))
569
570 (define-public vimb
571 (package
572 (name "vimb")
573 (version "3.6.0")
574 (source
575 (origin
576 (method git-fetch)
577 (uri (git-reference
578 (url "https://github.com/fanglingsu/vimb/")
579 (commit version)))
580 (sha256
581 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
582 (file-name (git-file-name name version))))
583 (build-system glib-or-gtk-build-system)
584 (arguments
585 '(#:tests? #f ; no tests
586 #:make-flags (list "CC=gcc"
587 "DESTDIR="
588 (string-append "PREFIX=" %output))
589 #:phases
590 (modify-phases %standard-phases
591 (delete 'configure))))
592 (inputs
593 `(("glib-networking" ,glib-networking)
594 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
595 ("webkitgtk" ,webkitgtk)))
596 (native-inputs
597 `(("pkg-config" ,pkg-config)))
598 (home-page "https://fanglingsu.github.io/vimb/")
599 (synopsis "Fast and lightweight Vim-like web browser")
600 (description "Vimb is a fast and lightweight vim like web browser based on
601 the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
602 vim editor and also easily configurable during runtime. Vimb is mostly keyboard
603 driven and does not detract you from your daily work.")
604 (license license:gpl3+)))
605
606 (define-public nyxt
607 (package
608 (name "nyxt")
609 (version "2.1.1")
610 (source
611 (origin
612 (method git-fetch)
613 (uri (git-reference
614 ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
615 ;; (url "https://source.atlas.engineer/public/nyxt")
616 (url "https://github.com/atlas-engineer/nyxt")
617 (commit version)))
618 (sha256
619 (base32
620 "0kzm05swhyb197cjfd3iglf60b997sx7v95yxzyq483jxqbcxm0r"))
621 (file-name (git-file-name "nyxt" version))))
622 (build-system gnu-build-system)
623 (arguments
624 `(#:make-flags (list "nyxt" "NYXT_INTERNAL_QUICKLISP=false"
625 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
626 "PREFIX=")
627 #:strip-binaries? #f ; Stripping breaks SBCL binaries.
628 #:phases
629 (modify-phases %standard-phases
630 (delete 'configure)
631 (add-before 'build 'fix-common-lisp-cache-folder
632 (lambda _
633 (setenv "HOME" "/tmp")
634 #t))
635 (add-before 'check 'configure-tests
636 (lambda _
637 (setenv "NYXT_TESTS_NO_NETWORK" "1")
638 (setenv "NYXT_TESTS_ERROR_ON_FAIL" "1")
639 #t))
640 (add-after 'install 'wrap-program
641 (lambda* (#:key inputs outputs #:allow-other-keys)
642 (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
643 (glib-networking (assoc-ref inputs "glib-networking"))
644 (libs '("gsettings-desktop-schemas"))
645 (path (string-join
646 (map (lambda (lib)
647 (string-append (assoc-ref inputs lib) "/lib"))
648 libs)
649 ":"))
650 (gi-path (getenv "GI_TYPELIB_PATH"))
651 (xdg-path (string-join
652 (map (lambda (lib)
653 (string-append (assoc-ref inputs lib) "/share"))
654 libs)
655 ":")))
656 (wrap-program bin
657 `("GIO_EXTRA_MODULES" prefix
658 (,(string-append glib-networking "/lib/gio/modules")))
659 `("GI_TYPELIB_PATH" prefix (,gi-path))
660 `("LD_LIBRARY_PATH" ":" prefix (,path))
661 `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))
662 #t))))))
663 (native-inputs
664 `(("prove" ,sbcl-prove)
665 ("sbcl" ,sbcl)))
666 (inputs
667 `(("alexandria" ,sbcl-alexandria)
668 ("bordeaux-threads" ,sbcl-bordeaux-threads)
669 ("cl-calispel" ,sbcl-calispel)
670 ("cl-containers" ,sbcl-cl-containers)
671 ("cl-css" ,sbcl-cl-css)
672 ("cl-custom-hash-table" ,sbcl-custom-hash-table)
673 ("cl-html-diff" ,sbcl-cl-html-diff)
674 ("cl-json" ,sbcl-cl-json)
675 ("cl-markup" ,sbcl-cl-markup)
676 ("cl-ppcre" ,sbcl-cl-ppcre)
677 ("cl-prevalence" ,sbcl-cl-prevalence)
678 ("closer-mop" ,sbcl-closer-mop)
679 ("cluffer" ,sbcl-cluffer)
680 ("dexador" ,sbcl-dexador)
681 ("enchant" ,sbcl-enchant)
682 ("fset" ,sbcl-fset)
683 ("hu.dwim.defclass-star" ,sbcl-hu.dwim.defclass-star)
684 ("iolib" ,sbcl-iolib)
685 ("local-time" ,sbcl-local-time)
686 ("log4cl" ,sbcl-log4cl)
687 ("mk-string-metrics" ,sbcl-mk-string-metrics)
688 ("moptilities" ,sbcl-moptilities)
689 ("named-readtables" ,sbcl-named-readtables)
690 ("parenscript" ,sbcl-parenscript)
691 ("plump" ,sbcl-plump)
692 ("quri" ,sbcl-quri)
693 ("serapeum" ,sbcl-serapeum)
694 ("str" ,sbcl-cl-str)
695 ("swank" ,sbcl-slime-swank)
696 ("trivia" ,sbcl-trivia)
697 ("trivial-clipboard" ,sbcl-trivial-clipboard)
698 ("trivial-features" ,sbcl-trivial-features)
699 ("trivial-package-local-nicknames" ,sbcl-trivial-package-local-nicknames)
700 ("trivial-types" ,sbcl-trivial-types)
701 ("unix-opts" ,sbcl-unix-opts)
702 ;; WebKitGTK deps
703 ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk)
704 ("cl-webkit" ,sbcl-cl-webkit)
705 ("glib-networking" ,glib-networking)
706 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
707 ;; GObjectIntrospection
708 ("cl-gobject-introspection" ,sbcl-cl-gobject-introspection)
709 ("gtk" ,gtk+) ; For the main loop.
710 ("webkitgtk" ,webkitgtk) ; Required when we use its typelib.
711 ("gobject-introspection" ,gobject-introspection)))
712 (synopsis "Extensible web-browser in Common Lisp")
713 (home-page "https://nyxt.atlas.engineer")
714 (description "Nyxt is a keyboard-oriented, extensible web browser designed
715 for power users. Conceptually inspired by Emacs and Vim, it has familiar
716 key-bindings (Emacs, vi, CUA), and is fully configurable in Common Lisp.")
717 (license license:bsd-3)))
718
719 (define-public next
720 (deprecated-package "next" nyxt))
721
722 (define-public sbcl-next
723 (deprecated-package "sbcl-next" nyxt))
724
725 (define-public lagrange
726 (package
727 (name "lagrange")
728 (version "1.5.2")
729 (source
730 (origin
731 (method url-fetch)
732 (uri
733 (string-append "https://git.skyjake.fi/skyjake/lagrange/releases/"
734 "download/v" version "/lagrange-" version ".tar.gz"))
735 (sha256
736 (base32 "0gqaipgs16kw711ijhshmbhhvlyjvh37wxdz059p4vvjhfrxbr1v"))))
737 (build-system cmake-build-system)
738 (arguments
739 `(#:tests? #false)) ;no tests
740 (native-inputs
741 `(("pkg-config" ,pkg-config)))
742 (inputs
743 `(("libunistring" ,libunistring)
744 ("mpg123" ,mpg123)
745 ("openssl" ,openssl)
746 ("pcre" ,pcre)
747 ("sdl2" ,sdl2)
748 ("zlib" ,zlib)))
749 (home-page "https://gmi.skyjake.fi/lagrange/")
750 (synopsis "Graphical Gemini client")
751 (description
752 "Lagrange is a desktop GUI client for browsing Geminispace. It offers
753 modern conveniences familiar from web browsers, such as smooth scrolling,
754 inline image viewing, multiple tabs, visual themes, Unicode fonts, bookmarks,
755 history, and page outlines.")
756 (license license:bsd-2)))
757
758 (define-public gmni
759 (let ((commit "d8f0870446c471a42612d6a8e853ad9b723a6d39")
760 (revision "0"))
761 (package
762 (name "gmni")
763 (version (git-version "0" revision commit))
764 (source (origin
765 (method git-fetch)
766 (uri (git-reference
767 (url "https://git.sr.ht/~sircmpwn/gmni")
768 (commit commit)))
769 (sha256
770 (base32
771 "1h0iqm7l0i06glf5b2872w656s1mjdiqva14zh6sl4f5yp7zmvwr"))
772 (file-name (git-file-name name version))))
773 (build-system gnu-build-system)
774 (arguments
775 `(#:tests? #f ; no check target
776 #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
777 (inputs
778 `(("openssl" ,openssl)))
779 (native-inputs
780 `(("pkg-config" ,pkg-config)
781 ("scdoc" ,scdoc)))
782 (home-page "https://sr.ht/~sircmpwn/gmni")
783 (synopsis "Minimalist command line Gemini client")
784 (description "The gmni package includes:
785
786 @itemize
787 @item A CLI utility (like curl): gmni
788 @item A line-mode browser: gmnlm
789 @end itemize")
790 (license (list license:gpl3+
791 (license:non-copyleft
792 "https://curl.se/docs/copyright.html"
793 "Used only for files taken from curl."))))))
794
795 (define-public bombadillo
796 (package
797 (name "bombadillo")
798 (version "2.3.3")
799 (source (origin
800 (method git-fetch)
801 (uri (git-reference
802 (url "https://tildegit.org/sloum/bombadillo")
803 (commit version)))
804 (sha256
805 (base32
806 "02w6h44sxzmk3bkdidl8xla0i9rwwpdqljnvcbydx5kyixycmg0q"))
807 (file-name (git-file-name name version))))
808 (build-system go-build-system)
809 (arguments
810 `(#:import-path "tildegit.org/sloum/bombadillo"
811 #:install-source? #f
812 #:phases (modify-phases %standard-phases
813 (add-after 'install 'install-data
814 (lambda* (#:key outputs #:allow-other-keys)
815 (let* ((builddir "src/tildegit.org/sloum/bombadillo")
816 (out (assoc-ref outputs "out"))
817 (pkg (strip-store-file-name out))
818 (sharedir (string-append out "/share"))
819 (appdir (string-append sharedir "/applications"))
820 (docdir (string-append sharedir "/doc/" pkg))
821 (mandir (string-append sharedir "/man/man1"))
822 (pixdir (string-append sharedir "/pixmaps")))
823 (with-directory-excursion builddir
824 (install-file "bombadillo.desktop" appdir)
825 (install-file "bombadillo.1" mandir)
826 (install-file "bombadillo-icon.png" pixdir)
827 #t)))))))
828 (home-page "https://bombadillo.colorfield.space")
829 (synopsis "Terminal browser for the gopher, gemini, and finger protocols")
830 (description "Bombadillo is a non-web browser for the terminal with
831 vim-like key bindings, a document pager, configurable settings, and robust
832 command selection. The following protocols are supported as first-class
833 citizens: gopher, gemini, finger, and local. There is also support for telnet,
834 http, and https via third-party applications.")
835 (license license:gpl3+)))
836
837 (define-public tinmop
838 (package
839 (name "tinmop")
840 (version "0.8.3")
841 (source
842 (origin
843 (method git-fetch)
844 (uri (git-reference
845 (url "https://notabug.org/cage/tinmop")
846 (commit (string-append "v" version))))
847 (file-name (git-file-name name version))
848 (sha256
849 (base32 "117p1wxi5swmqw429qrswxz2zvp1dcaw2145gk6zxlgwln48qxl8"))))
850 (build-system gnu-build-system)
851 (native-inputs
852 `(("curl" ,curl)
853 ("gettext" ,gnu-gettext)
854 ("gnupg" ,gnupg)
855 ("sbcl" ,sbcl)))
856 (inputs
857 `(("access" ,sbcl-access)
858 ("alexandria" ,sbcl-alexandria)
859 ("babel" ,sbcl-babel)
860 ("bordeaux-threads" ,sbcl-bordeaux-threads)
861 ("cl-base64" ,sbcl-cl-base64)
862 ("cl-colors2" ,sbcl-cl-colors2)
863 ("cl-html5-parser" ,sbcl-cl-html5-parser)
864 ("cl-i18n" ,sbcl-cl-i18n)
865 ("cl-ppcre" ,sbcl-cl-ppcre)
866 ("cl-spark" ,sbcl-cl-spark)
867 ("cl-sqlite" ,sbcl-cl-sqlite)
868 ("cl+ssl" ,sbcl-cl+ssl)
869 ("clunit2" ,sbcl-clunit2)
870 ("croatoan" ,sbcl-croatoan)
871 ("crypto-shortcuts" ,sbcl-crypto-shortcuts)
872 ("drakma" ,sbcl-drakma)
873 ("esrap" ,sbcl-esrap)
874 ("ieee-floats" ,sbcl-ieee-floats)
875 ("local-time" ,sbcl-local-time)
876 ("log4cl" ,sbcl-log4cl)
877 ("marshal" ,sbcl-marshal)
878 ("nano" ,nano)
879 ("openssl" ,openssl)
880 ("osicat" ,sbcl-osicat)
881 ("parse-number" ,sbcl-parse-number)
882 ("percent-encoding" ,sbcl-percent-encoding)
883 ("sxql" ,sbcl-sxql)
884 ("sxql-composer" ,sbcl-sxql-composer)
885 ("tooter" ,sbcl-tooter)
886 ("unix-opts" ,sbcl-unix-opts)
887 ("usocket" ,sbcl-usocket)
888 ("xdg-utils" ,xdg-utils)))
889 (arguments
890 `(#:tests? #f
891 #:strip-binaries? #f
892 #:phases
893 (modify-phases %standard-phases
894 (add-after 'unpack 'set-home
895 (lambda _
896 (setenv "HOME" "/tmp")
897 #t))
898 (add-after 'configure 'fix-asdf
899 (lambda* (#:key inputs #:allow-other-keys)
900 (substitute* "Makefile.in"
901 (("LISP_COMPILER) ")
902 "LISP_COMPILER) --eval \"(require 'asdf)\" --eval \"(push \\\"$$(pwd)/\\\" asdf:*central-registry*)\" "))
903 #t)))))
904 (synopsis "Gemini and pleroma client with a terminal interface")
905 (description
906 "This package provides a Gemini and pleroma client with a terminal
907 interface.")
908 (home-page "https://www.autistici.org/interzona/tinmop.html")
909 (license license:gpl3+)))
910
911 (define-public telescope
912 (package
913 (name "telescope")
914 (version "0.3")
915 (source
916 (origin
917 (method url-fetch)
918 (uri (string-append "https://git.omarpolo.com/telescope/snapshot/"
919 "telescope-" version ".tar.gz"))
920 (sha256
921 (base32 "1wg5x04n9iri7jx1lzhmd79j41grhjm3mpxn9qq9nf8n102wlvm3"))))
922 (build-system gnu-build-system)
923 (arguments
924 `(#:tests? #f)) ;no tests
925 (native-inputs
926 `(("autoconf" ,autoconf)
927 ("automake" ,automake)
928 ("bison" ,bison)
929 ("gettext" ,gettext-minimal)))
930 (inputs
931 `(("libevent" ,libevent)
932 ("libressl" ,libressl)
933 ("ncurses" ,ncurses)))
934 (home-page "https://git.omarpolo.com/telescope/about/")
935 (synopsis "Gemini client with a terminal interface")
936 (description "Telescope is a w3m-like browser for Gemini.")
937 (license license:x11)))