Merge branch 'master' into staging
[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, 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>
13 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
14 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
15 ;;;
16 ;;; This file is part of GNU Guix.
17 ;;;
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
22 ;;;
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
27 ;;;
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31 (define-module (gnu packages web-browsers)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages backup)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages documentation)
38 #:use-module (gnu packages fltk)
39 #:use-module (gnu packages fontutils)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages gnupg)
44 #:use-module (gnu packages libevent)
45 #:use-module (gnu packages libidn)
46 #:use-module (gnu packages lisp)
47 #:use-module (gnu packages lisp-xyz)
48 #:use-module (gnu packages lua)
49 #:use-module (gnu packages gnome)
50 #:use-module (gnu packages gnome-xyz)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages python-web)
56 #:use-module (gnu packages python-xyz)
57 #:use-module (gnu packages qt)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages sqlite)
60 #:use-module (gnu packages tls)
61 #:use-module (gnu packages webkit)
62 #:use-module (gnu packages xorg)
63 #:use-module (gnu packages gcc)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix build-system cmake)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system glib-or-gtk)
69 #:use-module (guix build-system python)
70 #:use-module (guix build-system asdf)
71 #:use-module (guix build-system go))
72
73 (define-public midori
74 (package
75 (name "midori")
76 (version "9.0")
77 (source
78 (origin
79 (method url-fetch)
80 (uri
81 (string-append "https://github.com/midori-browser/core/releases/"
82 "download/v" version "/" name "-v" version ".tar.gz"))
83 (sha256
84 (base32
85 "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy"))))
86 (build-system cmake-build-system)
87 (arguments
88 `(#:imported-modules
89 (,@%cmake-build-system-modules
90 (guix build glib-or-gtk-build-system))
91 #:modules
92 ((guix build cmake-build-system)
93 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
94 (guix build utils))
95 #:phases
96 (modify-phases %standard-phases
97 (add-after 'install 'glib-or-gtk-compile-schemas
98 (assoc-ref glib-or-gtk:%standard-phases
99 'glib-or-gtk-compile-schemas))
100 (add-after 'install 'glib-or-gtk-wrap
101 (assoc-ref glib-or-gtk:%standard-phases
102 'glib-or-gtk-wrap)))))
103 (native-inputs
104 `(("glib:bin" ,glib "bin")
105 ("gtk+:bin" ,gtk+ "bin")
106 ("intltool" ,intltool)
107 ("pkg-config" ,pkg-config)))
108 (inputs
109 `(("adwaita-icon-theme" ,adwaita-icon-theme)
110 ("gcr" ,gcr)
111 ("glib" ,glib)
112 ("glib-networking" ,glib-networking)
113 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
114 ("gtk+" ,gtk+)
115 ("json-glib" ,json-glib)
116 ("libarchive" ,libarchive)
117 ("libpeas" ,libpeas)
118 ("libsoup" ,libsoup)
119 ("sqlite" ,sqlite)
120 ("vala" ,vala)
121 ("webkitgtk" ,webkitgtk)))
122 (synopsis "Lightweight graphical web browser")
123 (description "@code{Midori} is a lightweight, Webkit-based web browser.
124 It features integration with GTK+3, configurable web search engine, bookmark
125 management, extensions such as advertisement blocker and colorful tabs.")
126 (home-page "https://www.midori-browser.org")
127 (license license:lgpl2.1+)))
128
129 (define-public dillo
130 (package
131 (name "dillo")
132 (version "3.0.5")
133 (source (origin
134 (method url-fetch)
135 (uri (string-append "https://www.dillo.org/download/"
136 "dillo-" version ".tar.bz2"))
137 (sha256
138 (base32
139 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
140 (build-system gnu-build-system)
141 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
142 (native-inputs `(("pkg-config" ,pkg-config)))
143 (inputs `(("fltk" ,fltk)
144 ("fontconfig" ,fontconfig)
145 ("libjpeg" ,libjpeg-turbo)
146 ("libpng" ,libpng)
147 ("libxcursor" ,libxcursor)
148 ("libxft" ,libxft)
149 ("libxi" ,libxi)
150 ("libxinerama" ,libxinerama)
151 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
152 ("perl" ,perl)
153 ("zlib" ,zlib)))
154 (synopsis "Very small and fast graphical web browser")
155 (description "Dillo is a minimalistic web browser particularly intended for
156 older or slower computers and embedded systems.")
157 (home-page "https://www.dillo.org")
158 (license license:gpl3+)))
159
160 (define-public links
161 (package
162 (name "links")
163 (version "2.20.2")
164 (source (origin
165 (method url-fetch)
166 (uri (string-append "http://links.twibright.com/download/"
167 "links-" version ".tar.bz2"))
168 (sha256
169 (base32
170 "097ll98ympzfx7qfdyhc52yzvsp167x5nnjs6v8ih496wv80fksb"))))
171 (build-system gnu-build-system)
172 (arguments
173 `(#:phases
174 (modify-phases %standard-phases
175 (replace 'configure
176 (lambda* (#:key outputs #:allow-other-keys)
177 ;; The tarball uses a very old version of autconf. It doesn't
178 ;; understand extra flags like `--enable-fast-install', so
179 ;; we need to invoke it with just what it understands.
180 (let ((out (assoc-ref outputs "out")))
181 ;; 'configure' doesn't understand '--host'.
182 ,@(if (%current-target-system)
183 `((setenv "CHOST" ,(%current-target-system)))
184 '())
185 (setenv "CONFIG_SHELL" (which "bash"))
186 (invoke "./configure"
187 (string-append "--prefix=" out)
188 "--enable-graphics")
189 #t))))))
190 (native-inputs `(("pkg-config" ,pkg-config)))
191 (inputs `(("zlib" ,zlib)
192 ("openssl" ,openssl)
193 ("libjpeg" ,libjpeg-turbo)
194 ("libtiff" ,libtiff)
195 ("libevent" ,libevent)
196 ("libpng" ,libpng)
197 ("libxt" ,libxt)))
198 (synopsis "Text and graphics mode web browser")
199 (description "Links is a graphics and text mode web browser, with many
200 features including, tables, builtin image display, bookmarks, SSL and more.")
201 (home-page "http://links.twibright.com")
202 ;; The distribution contains a copy of GPLv2
203 ;; However, the copyright notices simply say:
204 ;; "This file is a part of the Links program, released under GPL."
205 ;; Therefore, under the provisions of Section 9, we can choose
206 ;; any version ever published by the FSF.
207 ;; One file (https.c) contains an exception permitting
208 ;; linking of the program with openssl.
209 (license license:gpl1+)))
210
211 (define-public luakit
212 (package
213 (name "luakit")
214 (version "2.1")
215 (source (origin
216 (method git-fetch)
217 (uri (git-reference
218 (url "https://github.com/luakit/luakit.git")
219 (commit version)))
220 (file-name (git-file-name name version))
221 (sha256
222 (base32
223 "1qa90caxv1k6ak88fn0a7n7h0c4iv8szw6zn2axch8ig83i86az2"))))
224 (inputs
225 `(("lua-5.1" ,lua-5.1)
226 ("gtk+" ,gtk+)
227 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
228 ("glib-networking" ,glib-networking)
229 ("lua5.1-filesystem" ,lua5.1-filesystem)
230 ("luajit" ,luajit)
231 ("webkitgtk" ,webkitgtk)
232 ("sqlite" ,sqlite)))
233 (native-inputs
234 `(("pkg-config" ,pkg-config)))
235 (build-system glib-or-gtk-build-system)
236 (arguments
237 '(#:make-flags
238 (let ((out (assoc-ref %outputs "out")))
239 (list
240 "CC=gcc"
241 "LUA_BIN_NAME=lua"
242 "DEVELOPMENT_PATHS=0"
243 (string-append "PREFIX=" out)
244 (string-append "XDGPREFIX=" out "/etc/xdg")))
245 #:phases
246 (modify-phases %standard-phases
247 (add-before 'build 'lfs-workaround
248 (lambda _
249 (setenv "LUA_CPATH"
250 (string-append
251 (assoc-ref %build-inputs "lua5.1-filesystem")
252 "/lib/lua/5.1/?.so;;"))
253 #t))
254 (delete 'configure)
255 (delete 'check)
256 (add-after 'install 'wrap
257 (lambda* (#:key inputs outputs #:allow-other-keys)
258 (let* ((luakit (assoc-ref outputs "out"))
259 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
260 (gtk (assoc-ref inputs "gtk+"))
261 (gtk-share (string-append gtk "/share")))
262 (wrap-program (string-append luakit "/bin/luakit")
263 `("LUA_CPATH" prefix
264 (,(string-append lua5.1-filesystem
265 "/lib/lua/5.1/?.so;;")))
266 `("XDG_CONFIG_DIRS" prefix
267 (,(string-append luakit "/etc/xdg/"))))
268 #t))))))
269 (synopsis "Fast, lightweight, and simple browser based on WebKit")
270 (description "Luakit is a fast, lightweight, and simple to use
271 micro-browser framework extensible by Lua using the WebKit web content engine
272 and the GTK+ toolkit.")
273 (home-page "https://luakit.github.io/")
274 (license license:gpl3+)))
275
276 (define-public lynx
277 (package
278 (name "lynx")
279 (version "2.8.9rel.1")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append
283 "http://invisible-mirror.net/archives/lynx/tarballs"
284 "/lynx" version ".tar.bz2"))
285 (sha256
286 (base32
287 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
288 (build-system gnu-build-system)
289 (native-inputs `(("pkg-config" ,pkg-config)
290 ("perl" ,perl)))
291 (inputs `(("ncurses" ,ncurses)
292 ("libidn" ,libidn)
293 ("openssl" ,openssl)
294 ("libgcrypt" ,libgcrypt)
295 ("unzip" ,unzip)
296 ("zlib" ,zlib)
297 ("gzip" ,gzip)
298 ("bzip2" ,bzip2)))
299 (arguments
300 `(#:configure-flags
301 (let ((openssl (assoc-ref %build-inputs "openssl")))
302 `("--with-pkg-config"
303 "--with-screen=ncurses"
304 "--with-zlib"
305 "--with-bzlib"
306 ,(string-append "--with-ssl=" openssl)
307 ;; "--with-socks5" ; XXX TODO
308 "--enable-widec"
309 "--enable-ascii-ctypes"
310 "--enable-local-docs"
311 "--enable-htmlized-cfg"
312 "--enable-gzip-help"
313 "--enable-nls"
314 "--enable-ipv6"))
315 #:tests? #f ; no check target
316 #:phases
317 (modify-phases %standard-phases
318 (add-before 'configure 'set-makefile-shell
319 (lambda _ (substitute* "po/makefile.inn"
320 (("/bin/sh") (which "sh")))
321 #t))
322 (replace 'install
323 (lambda* (#:key (make-flags '()) #:allow-other-keys)
324 (apply invoke "make" "install-full" make-flags)
325 #t)))))
326 (synopsis "Text Web Browser")
327 (description
328 "Lynx is a fully-featured World Wide Web (WWW) client for users running
329 cursor-addressable, character-cell display devices. It will display Hypertext
330 Markup Language (HTML) documents containing links to files on the local
331 system, as well as files on remote systems running http, gopher, ftp, wais,
332 nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
333 the WWW, or to build information systems intended primarily for local
334 access.")
335 (home-page "https://lynx.invisible-island.net/")
336 ;; This was fixed in 2.8.9dev.10.
337 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
338 (license license:gpl2)))
339
340 (define-public qutebrowser
341 (package
342 (name "qutebrowser")
343 (version "1.11.0")
344 (source
345 (origin
346 (method url-fetch)
347 (uri (string-append "https://github.com/qutebrowser/"
348 "qutebrowser/releases/download/v" version "/"
349 "qutebrowser-" version ".tar.gz"))
350 (sha256
351 (base32
352 "0b0qlki9bp9mm41lrh6rc6qqvm4nsz8da63sby3a1f2xm9b9vvg2"))))
353 (build-system python-build-system)
354 (native-inputs
355 `(("python-attrs" ,python-attrs))) ; for tests
356 (inputs
357 `(("python-colorama" ,python-colorama)
358 ("python-cssutils" ,python-cssutils)
359 ("python-jinja2" ,python-jinja2)
360 ("python-markupsafe" ,python-markupsafe)
361 ("python-pygments" ,python-pygments)
362 ("python-pypeg2" ,python-pypeg2)
363 ("python-pyyaml" ,python-pyyaml)
364 ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
365 ;; that it's __init__.py is used first.
366 ("python-pyqtwebengine" ,python-pyqtwebengine)
367 ("python-pyqt" ,python-pyqt)
368 ;; While qtwebengine is provided by python-pyqtwebengine, it's
369 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
370 ("qtwebengine" ,qtwebengine)))
371 (arguments
372 `(;; FIXME: With the existance of qtwebengine, tests can now run. But
373 ;; they are still disabled because test phase hangs. It's not readily
374 ;; apparent as to why.
375 #:tests? #f
376 #:phases
377 (modify-phases %standard-phases
378 (add-before 'check 'set-env-offscreen
379 (lambda _
380 (setenv "QT_QPA_PLATFORM" "offscreen")
381 #t))
382 (add-after 'install 'install-more
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let* ((out (assoc-ref outputs "out"))
385 (app (string-append out "/share/applications"))
386 (hicolor (string-append out "/share/icons/hicolor")))
387 (install-file "doc/qutebrowser.1"
388 (string-append out "/share/man/man1"))
389 (for-each
390 (lambda (i)
391 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
392 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
393 hicolor i i)))
394 (mkdir-p (dirname dest))
395 (copy-file src dest)))
396 '(16 24 32 48 64 128 256 512))
397 (install-file "icons/qutebrowser.svg"
398 (string-append hicolor "/scalable/apps"))
399 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
400 (("Exec=qutebrowser")
401 (string-append "Exec=" out "/bin/qutebrowser")))
402 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
403 #t)))
404 (add-after 'wrap 'wrap-qt-process-path
405 (lambda* (#:key inputs outputs #:allow-other-keys)
406 (let* ((out (assoc-ref outputs "out"))
407 (bin (string-append out "/bin/qutebrowser"))
408 (qt-process-path (string-append
409 (assoc-ref inputs "qtwebengine")
410 "/lib/qt5/libexec/QtWebEngineProcess")))
411 (wrap-program bin
412 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
413 #t))))))
414 (home-page "https://qutebrowser.org/")
415 (synopsis "Minimal, keyboard-focused, vim-like web browser")
416 (description "qutebrowser is a keyboard-focused browser with a minimal
417 GUI. It is based on PyQt5 and QtWebEngine.")
418 (license license:gpl3+)))
419
420 (define-public vimb
421 (package
422 (name "vimb")
423 (version "3.6.0")
424 (source
425 (origin
426 (method git-fetch)
427 (uri (git-reference
428 (url "https://github.com/fanglingsu/vimb/")
429 (commit version)))
430 (sha256
431 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
432 (file-name (git-file-name name version))))
433 (build-system glib-or-gtk-build-system)
434 (arguments
435 '(#:tests? #f ; no tests
436 #:make-flags (list "CC=gcc"
437 "DESTDIR="
438 (string-append "PREFIX=" %output))
439 #:phases
440 (modify-phases %standard-phases
441 (delete 'configure))))
442 (inputs
443 `(("glib-networking" ,glib-networking)
444 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
445 ("webkitgtk" ,webkitgtk)))
446 (native-inputs
447 `(("pkg-config" ,pkg-config)))
448 (home-page "https://fanglingsu.github.io/vimb/")
449 (synopsis "Fast and lightweight Vim-like web browser")
450 (description "Vimb is a fast and lightweight vim like web browser based on
451 the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
452 vim editor and also easily configurable during runtime. Vimb is mostly keyboard
453 driven and does not detract you from your daily work.")
454 (license license:gpl3+)))
455
456 (define next-gtk-webkit
457 (package
458 (name "next-gtk-webkit")
459 (version "1.5.0")
460 (source
461 (origin
462 (method git-fetch)
463 (uri (git-reference
464 ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
465 ;; (url "https://source.atlas.engineer/public/next")
466 (url "https://github.com/atlas-engineer/next")
467 (commit version)))
468 (sha256
469 (base32
470 "1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy"))
471 (file-name (git-file-name "next" version))))
472 (build-system glib-or-gtk-build-system)
473 (arguments
474 `(#:tests? #f ; no tests
475 #:make-flags (list "gtk-webkit"
476 "CC=gcc"
477 (string-append "PREFIX=" %output))
478 #:phases
479 (modify-phases %standard-phases
480 (delete 'configure)
481 (replace 'install
482 (lambda* (#:key (make-flags '()) #:allow-other-keys)
483 (apply invoke "make" "install-gtk-webkit" make-flags))))))
484 (inputs
485 `(("glib-networking" ,glib-networking)
486 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
487 ("webkitgtk" ,webkitgtk)))
488 (native-inputs
489 `(("pkg-config" ,pkg-config)))
490 (home-page "https://next.atlas.engineer")
491 (synopsis "Extensible web-browser in Common Lisp")
492 (description "Next is a keyboard-oriented, extensible web-browser
493 designed for power users. The application has familiar Emacs and VI
494 key-bindings and is fully configurable and extensible in Common Lisp.")
495 (license license:bsd-3)))
496
497 (define sbcl-next-download-manager
498 (package
499 (inherit next-gtk-webkit)
500 (name "sbcl-next-download-manager")
501 (build-system asdf-build-system/sbcl)
502 (arguments
503 `(#:tests? #f ; Need online access.
504 #:asd-file "next.asd"
505 #:asd-system-name "next/download-manager"))
506 (inputs
507 `(("cl-ppcre" ,sbcl-cl-ppcre)
508 ("dexador" ,sbcl-dexador)
509 ("log4cl" ,sbcl-log4cl)
510 ("lparallel" ,sbcl-lparallel)
511 ("quri" ,sbcl-quri)
512 ("str" ,sbcl-cl-str)))
513 (native-inputs
514 `(("trivial-features" ,sbcl-trivial-features)
515 ("prove-asdf" ,sbcl-prove-asdf)))
516 (synopsis "Extensible web-browser in Common Lisp (download manager)")))
517
518 (define sbcl-next-ring
519 (package
520 (inherit next-gtk-webkit)
521 (name "sbcl-next-ring")
522 (build-system asdf-build-system/sbcl)
523 (arguments
524 `(#:tests? #t
525 #:asd-file "next.asd"
526 #:asd-system-name "next/ring"))
527 (native-inputs
528 `(("trivial-features" ,sbcl-trivial-features)
529 ("prove-asdf" ,sbcl-prove-asdf)))
530 (synopsis "Extensible web-browser in Common Lisp (ring)")))
531
532 (define sbcl-next-history-tree
533 (package
534 (inherit next-gtk-webkit)
535 (name "sbcl-next-history-tree")
536 (build-system asdf-build-system/sbcl)
537 (arguments
538 `(#:tests? #t
539 #:asd-file "next.asd"
540 #:asd-system-name "next/history-tree"))
541 (native-inputs
542 `(("trivial-features" ,sbcl-trivial-features)
543 ("prove-asdf" ,sbcl-prove-asdf)))
544 (synopsis "Extensible web-browser in Common Lisp (history-tree)")))
545
546 (define sbcl-next-password-manager
547 (package
548 (inherit next-gtk-webkit)
549 (name "sbcl-next-password-manager")
550 (build-system asdf-build-system/sbcl)
551 (arguments
552 `(#:tests? #t
553 #:asd-file "next.asd"
554 #:asd-system-name "next/password-manager"))
555 (inputs
556 `(("bordeaux-threads" ,sbcl-bordeaux-threads)
557 ("cl-annot" ,sbcl-cl-annot)
558 ("cl-ppcre" ,sbcl-cl-ppcre)
559 ("str" ,sbcl-cl-str)
560 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
561 (native-inputs
562 `(("trivial-features" ,sbcl-trivial-features)
563 ("prove-asdf" ,sbcl-prove-asdf)))
564 (synopsis "Extensible web-browser in Common Lisp (password manager)")))
565
566 (define sbcl-next-hooks
567 (package
568 (inherit next-gtk-webkit)
569 (name "sbcl-next-hooks")
570 (build-system asdf-build-system/sbcl)
571 (arguments
572 `(#:tests? #t
573 #:asd-file "next.asd"
574 #:asd-system-name "next/hooks"))
575 (inputs
576 `(("alexandria" ,sbcl-alexandria)
577 ("serapeum" ,sbcl-serapeum)))
578 (native-inputs
579 `(("trivial-features" ,sbcl-trivial-features)
580 ("prove-asdf" ,sbcl-prove-asdf)))
581 (synopsis "Infinitely extensible web-browser (hooks)")))
582
583 (define-public next
584 (let ((version (package-version next-gtk-webkit)))
585 (package
586 (inherit next-gtk-webkit)
587 (name "next")
588 (build-system asdf-build-system/sbcl)
589 (outputs '("out" "lib"))
590 (arguments
591 `(#:tests? #f ; no tests
592 #:asd-system-name "next"
593 #:phases (modify-phases %standard-phases
594 (add-after 'unpack 'patch-platform-port-path
595 (lambda* (#:key inputs #:allow-other-keys)
596 (substitute* "source/ports/gtk-webkit.lisp"
597 (("\"next-gtk-webkit\"")
598 (string-append "\"" (assoc-ref inputs "next-gtk-webkit")
599 "/bin/next-gtk-webkit\"")))
600 #t))
601 (add-after 'patch-platform-port-path 'patch-version
602 ;; When the version is not just dot-separated numerals
603 ;; (e.g. a git-commit version), Guix modifies the .asd with
604 ;; an illegal version number, and then Next fails to query
605 ;; it. So we hard-code it here.
606 (lambda* (#:key inputs #:allow-other-keys)
607 (let ((version (format #f "~a" ,version)))
608 (substitute* "source/global.lisp"
609 (("version\\)\\)\\)")
610 (string-append "version)))
611 (setf +version+ \"" version "\")"))))
612 #t))
613 (add-before 'cleanup 'move-bundle
614 (lambda* (#:key outputs #:allow-other-keys)
615 (define lib (assoc-ref outputs "lib"))
616 (define actual-fasl (string-append
617 lib
618 "/lib/sbcl/next.fasl"))
619 (define expected-fasl (string-append
620 lib
621 "/lib/sbcl/next--system.fasl"))
622 (copy-file actual-fasl expected-fasl)
623 #t))
624 (add-after 'create-symlinks 'build-program
625 (lambda* (#:key outputs #:allow-other-keys)
626 (build-program
627 (string-append (assoc-ref outputs "out") "/bin/next")
628 outputs
629 #:entry-program '((next:entry-point) 0))))
630 (add-before 'build 'install-assets
631 ;; Since the ASDF build system generates a new .asd with a
632 ;; possibly suffixed and thus illegal version number, assets
633 ;; should not be installed after the 'build phase or else
634 ;; the illegal version will result in NIL in the .desktop
635 ;; file.
636 (lambda* (#:key outputs #:allow-other-keys)
637 (with-output-to-file "version"
638 (lambda _
639 (format #t "~a" ,(package-version next-gtk-webkit))))
640 (invoke "make" "install-assets"
641 (string-append "PREFIX="
642 (assoc-ref outputs "out")))))
643 (add-after 'unpack 'fix-lambda-list
644 ;; Starting from SBCL 2.0.2, Next 1.5.0 won't build
645 ;; because of a weird lambda list type.
646 (lambda _
647 (substitute* "source/keymap.lisp"
648 (("^\\(declaim .* define-key\\)\\)") ""))
649 (substitute* "source/search-buffer.lisp"
650 (("define-key :keymap keymap \"C-s\"") "define-key \"C-s\"")
651 (("\\(update-selection-highlight-hint :follow t :scroll t\\)\\)\\)")
652 "(update-selection-highlight-hint :follow t :scroll t)) :keymap keymap)")))))))
653 (inputs
654 `(("alexandria" ,sbcl-alexandria)
655 ("bordeaux-threads" ,sbcl-bordeaux-threads)
656 ("cl-annot" ,sbcl-cl-annot)
657 ("cl-ansi-text" ,sbcl-cl-ansi-text)
658 ("cl-css" ,sbcl-cl-css)
659 ("cl-json" ,sbcl-cl-json)
660 ("cl-markup" ,sbcl-cl-markup)
661 ("cl-ppcre" ,sbcl-cl-ppcre)
662 ("cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode)
663 ("cl-prevalence" ,sbcl-cl-prevalence)
664 ("closer-mop" ,sbcl-closer-mop)
665 ("dbus" ,cl-dbus)
666 ("dexador" ,sbcl-dexador)
667 ("ironclad" ,sbcl-ironclad)
668 ("local-time" ,sbcl-local-time)
669 ("log4cl" ,sbcl-log4cl)
670 ("lparallel" ,sbcl-lparallel)
671 ("mk-string-metrics" ,sbcl-mk-string-metrics)
672 ("parenscript" ,sbcl-parenscript)
673 ("plump" ,sbcl-plump)
674 ("quri" ,sbcl-quri)
675 ("serapeum" ,sbcl-serapeum)
676 ("sqlite" ,sbcl-cl-sqlite)
677 ("str" ,sbcl-cl-str)
678 ("swank" ,sbcl-slime-swank)
679 ("trivia" ,sbcl-trivia)
680 ("trivial-clipboard" ,sbcl-trivial-clipboard)
681 ("unix-opts" ,sbcl-unix-opts)
682 ;; Local deps
683 ("next-gtk-webkit" ,next-gtk-webkit)
684 ("next-download-manager" ,sbcl-next-download-manager)
685 ("next-ring" ,sbcl-next-ring)
686 ("next-history-tree" ,sbcl-next-history-tree)
687 ("next-password-manager" ,sbcl-next-password-manager)
688 ("next-hooks" ,sbcl-next-hooks)))
689 (native-inputs
690 `(("trivial-features" ,sbcl-trivial-features)
691 ("trivial-types" ,sbcl-trivial-types)
692 ("prove-asdf" ,sbcl-prove-asdf)))
693 (synopsis "Extensible web-browser in Common Lisp"))))
694
695 (define-public sbcl-next
696 (deprecated-package "sbcl-next" next))
697
698 (define-public bombadillo
699 (package
700 (name "bombadillo")
701 (version "2.2.0")
702 (source (origin
703 (method git-fetch)
704 (uri (git-reference
705 (url "https://tildegit.org/sloum/bombadillo")
706 (commit version)))
707 (sha256
708 (base32
709 "1m52b1wk48gkqmjy8l0x3jaksrx2v8w6w59lhr7zaw2i0n4f5k0z"))
710 (file-name (git-file-name name version))))
711 (build-system go-build-system)
712 (arguments
713 `(#:import-path "tildegit.org/sloum/bombadillo"
714 #:install-source? #f
715 #:phases (modify-phases %standard-phases
716 (add-after 'install 'install-data
717 (lambda* (#:key outputs #:allow-other-keys)
718 (let* ((builddir "src/tildegit.org/sloum/bombadillo")
719 (out (assoc-ref outputs "out"))
720 (pkg (strip-store-file-name out))
721 (sharedir (string-append out "/share"))
722 (appdir (string-append sharedir "/applications"))
723 (docdir (string-append sharedir "/doc/" pkg))
724 (mandir (string-append sharedir "/man/man1"))
725 (pixdir (string-append sharedir "/pixmaps")))
726 (with-directory-excursion builddir
727 (install-file "bombadillo.desktop" appdir)
728 (install-file "LICENSE" docdir)
729 (install-file "bombadillo.1" mandir)
730 (install-file "bombadillo-icon.png" pixdir)
731 #t)))))))
732 (home-page "http://bombadillo.colorfield.space")
733 (synopsis "Terminal browser for the gopher, gemini, and finger protocols")
734 (description "Bombadillo is a non-web browser for the terminal with
735 vim-like key bindings, a document pager, configurable settings, and robust
736 command selection. The following protocols are supported as first-class
737 citizens: gopher, gemini, finger, and local. There is also support for telnet,
738 http, and https via third-party applications.")
739 (license license:gpl3+)))