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