gnu: Add gnome-arcade.
[jackhill/guix/guix.git] / gnu / packages / web-browsers.scm
CommitLineData
c21a2562 1;;; GNU Guix --- Functional package management for GNU
8bdc36d4 2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
5d3db373 3;;; Copyright © 2014, 2019 Mark H Weaver <mhw@netris.org>
320ba590 4;;; Copyright © 2015, 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 5;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
7610c3ca 6;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
04f3a5a4 7;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
c648781c 8;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
f0c817a7 9;;; Copyright © 2018 Timo Eisenmann <eisenmann@fn.de>
18974c1e 10;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
0e4cee0e 11;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
d7c58c3e 12;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
c21a2562
KY
13;;;
14;;; This file is part of GNU Guix.
15;;;
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.
20;;;
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.
25;;;
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/>.
28
0c3953ea 29(define-module (gnu packages web-browsers)
c21a2562
KY
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages compression)
7610c3ca 34 #:use-module (gnu packages documentation)
c21a2562
KY
35 #:use-module (gnu packages fltk)
36 #:use-module (gnu packages fontutils)
700987f7 37 #:use-module (gnu packages gtk)
c5196ac7 38 #:use-module (gnu packages gnupg)
8bdc36d4 39 #:use-module (gnu packages libevent)
c5196ac7 40 #:use-module (gnu packages libidn)
acad932e 41 #:use-module (gnu packages lisp)
88f06fd0 42 #:use-module (gnu packages lisp-xyz)
700987f7 43 #:use-module (gnu packages lua)
44 #:use-module (gnu packages gnome)
c5196ac7 45 #:use-module (gnu packages ncurses)
c21a2562
KY
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
7610c3ca 48 #:use-module (gnu packages python)
1b2f753d 49 #:use-module (gnu packages python-web)
44d10b1f 50 #:use-module (gnu packages python-xyz)
7610c3ca 51 #:use-module (gnu packages qt)
c21a2562 52 #:use-module (gnu packages image)
cd0322a3 53 #:use-module (gnu packages sqlite)
c21a2562 54 #:use-module (gnu packages tls)
700987f7 55 #:use-module (gnu packages webkit)
c21a2562 56 #:use-module (gnu packages xorg)
194d1ec3 57 #:use-module (gnu packages gcc)
c21a2562 58 #:use-module (guix download)
f0c817a7 59 #:use-module (guix git-download)
7610c3ca 60 #:use-module (guix build-system gnu)
700987f7 61 #:use-module (guix build-system glib-or-gtk)
acad932e
PN
62 #:use-module (guix build-system python)
63 #:use-module (guix build-system asdf))
c21a2562
KY
64
65(define-public dillo
66 (package
67 (name "dillo")
68 (version "3.0.5")
69 (source (origin
70 (method url-fetch)
62418049
TGR
71 (uri (string-append "https://www.dillo.org/download/"
72 "dillo-" version ".tar.bz2"))
c21a2562
KY
73 (sha256
74 (base32
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)
81 ("libjpeg" ,libjpeg)
82 ("libpng" ,libpng)
83 ("libxcursor" ,libxcursor)
84 ("libxft" ,libxft)
85 ("libxi" ,libxi)
86 ("libxinerama" ,libxinerama)
5d3db373 87 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
c21a2562
KY
88 ("perl" ,perl)
89 ("zlib" ,zlib)))
90 (synopsis "Very small and fast graphical web browser")
91 (description "Dillo is a minimalistic web browser particularly intended for
92older or slower computers and embedded systems.")
62418049 93 (home-page "https://www.dillo.org")
c21a2562 94 (license license:gpl3+)))
7610c3ca 95
8bdc36d4
KK
96(define-public links
97 (package
98 (name "links")
7696af42 99 (version "2.20.2")
8bdc36d4
KK
100 (source (origin
101 (method url-fetch)
102 (uri (string-append "http://links.twibright.com/download/"
5dcd4007 103 "links-" version ".tar.bz2"))
7696af42 104 (sha256
8bdc36d4 105 (base32
7696af42 106 "097ll98ympzfx7qfdyhc52yzvsp167x5nnjs6v8ih496wv80fksb"))))
8bdc36d4
KK
107 (build-system gnu-build-system)
108 (arguments
109 `(#:phases
110 (modify-phases %standard-phases
111 (replace 'configure
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)))
120 '())
121 (setenv "CONFIG_SHELL" (which "bash"))
b8b34be6
TGR
122 (invoke "./configure"
123 (string-append "--prefix=" out)
124 "--enable-graphics")
125 #t))))))
8bdc36d4
KK
126 (native-inputs `(("pkg-config" ,pkg-config)))
127 (inputs `(("zlib" ,zlib)
128 ("openssl" ,openssl)
129 ("libjpeg" ,libjpeg)
130 ("libtiff" ,libtiff)
131 ("libevent" ,libevent)
132 ("libpng" ,libpng)
133 ("libxt" ,libxt)))
134 (synopsis "Text and graphics mode web browser")
135 (description "Links is a graphics and text mode web browser, with many
136features 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+)))
146
700987f7 147(define-public luakit
148 (package
149 (name "luakit")
37956778 150 (version "2.1")
700987f7 151 (source (origin
320ba590
EF
152 (method git-fetch)
153 (uri (git-reference
154 (url "https://github.com/luakit/luakit.git")
155 (commit version)))
156 (file-name (git-file-name name version))
700987f7 157 (sha256
158 (base32
320ba590 159 "1qa90caxv1k6ak88fn0a7n7h0c4iv8szw6zn2axch8ig83i86az2"))))
700987f7 160 (inputs
b42b5afd 161 `(("lua-5.1" ,lua-5.1)
700987f7 162 ("gtk+" ,gtk+)
b42b5afd
MW
163 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
164 ("glib-networking" ,glib-networking)
165 ("lua5.1-filesystem" ,lua5.1-filesystem)
166 ("luajit" ,luajit)
167 ("webkitgtk" ,webkitgtk)
168 ("sqlite" ,sqlite)))
700987f7 169 (native-inputs
b42b5afd 170 `(("pkg-config" ,pkg-config)))
700987f7 171 (build-system glib-or-gtk-build-system)
172 (arguments
173 '(#:make-flags
174 (let ((out (assoc-ref %outputs "out")))
175 (list
176 "CC=gcc"
177 "LUA_BIN_NAME=lua"
178 "DEVELOPMENT_PATHS=0"
179 (string-append "PREFIX=" out)
180 (string-append "XDGPREFIX=" out "/etc/xdg")))
181 #:phases
182 (modify-phases %standard-phases
183 (add-before 'build 'lfs-workaround
184 (lambda _
185 (setenv "LUA_CPATH"
186 (string-append
187 (assoc-ref %build-inputs "lua5.1-filesystem")
188 "/lib/lua/5.1/?.so;;"))
189 #t))
190 (delete 'configure)
191 (delete 'check)
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")
199 `("LUA_CPATH" prefix
200 (,(string-append lua5.1-filesystem
f9984535
RM
201 "/lib/lua/5.1/?.so;;")))
202 `("XDG_CONFIG_DIRS" prefix
203 (,(string-append luakit "/etc/xdg/"))))
700987f7 204 #t))))))
205 (synopsis "Fast, lightweight, and simple browser based on WebKit")
206 (description "Luakit is a fast, lightweight, and simple to use
207micro-browser framework extensible by Lua using the WebKit web content engine
208and the GTK+ toolkit.")
209 (home-page "https://luakit.github.io/")
210 (license license:gpl3+)))
211
c5196ac7
KK
212(define-public lynx
213 (package
214 (name "lynx")
781e5158 215 (version "2.8.9rel.1")
c5196ac7
KK
216 (source (origin
217 (method url-fetch)
218 (uri (string-append
219 "http://invisible-mirror.net/archives/lynx/tarballs"
220 "/lynx" version ".tar.bz2"))
221 (sha256
222 (base32
781e5158 223 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
c5196ac7
KK
224 (build-system gnu-build-system)
225 (native-inputs `(("pkg-config" ,pkg-config)
226 ("perl" ,perl)))
227 (inputs `(("ncurses" ,ncurses)
228 ("libidn" ,libidn)
0e4cee0e 229 ("openssl" ,openssl)
c5196ac7
KK
230 ("libgcrypt" ,libgcrypt)
231 ("unzip" ,unzip)
232 ("zlib" ,zlib)
233 ("gzip" ,gzip)
234 ("bzip2" ,bzip2)))
235 (arguments
236 `(#:configure-flags
0e4cee0e 237 (let ((openssl (assoc-ref %build-inputs "openssl")))
c5196ac7
KK
238 `("--with-pkg-config"
239 "--with-screen=ncurses"
240 "--with-zlib"
241 "--with-bzlib"
0e4cee0e 242 ,(string-append "--with-ssl=" openssl)
c5196ac7
KK
243 ;; "--with-socks5" ; XXX TODO
244 "--enable-widec"
245 "--enable-ascii-ctypes"
246 "--enable-local-docs"
247 "--enable-htmlized-cfg"
248 "--enable-gzip-help"
249 "--enable-nls"
250 "--enable-ipv6"))
251 #:tests? #f ; no check target
dc1d3cde
KK
252 #:phases
253 (modify-phases %standard-phases
e3cea0d5
LF
254 (add-before 'configure 'set-makefile-shell
255 (lambda _ (substitute* "po/makefile.inn"
256 (("/bin/sh") (which "sh")))
257 #t))
dc1d3cde
KK
258 (replace 'install
259 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b8b34be6
TGR
260 (apply invoke "make" "install-full" make-flags)
261 #t)))))
c5196ac7
KK
262 (synopsis "Text Web Browser")
263 (description
264 "Lynx is a fully-featured World Wide Web (WWW) client for users running
265cursor-addressable, character-cell display devices. It will display Hypertext
266Markup Language (HTML) documents containing links to files on the local
267system, as well as files on remote systems running http, gopher, ftp, wais,
268nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
269the WWW, or to build information systems intended primarily for local
270access.")
9c2917f9 271 (home-page "https://lynx.invisible-island.net/")
faf2843b
EF
272 ;; This was fixed in 2.8.9dev.10.
273 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
c5196ac7
KK
274 (license license:gpl2)))
275
7610c3ca
KK
276(define-public qutebrowser
277 (package
278 (name "qutebrowser")
692c4b3b 279 (version "1.10.0")
7610c3ca
KK
280 (source
281 (origin
282 (method url-fetch)
a066e289 283 (uri (string-append "https://github.com/qutebrowser/"
7610c3ca
KK
284 "qutebrowser/releases/download/v" version "/"
285 "qutebrowser-" version ".tar.gz"))
286 (sha256
287 (base32
692c4b3b 288 "1prvd3cysmcjfybn0dmr3ih0bl6lm5ml9i7wd09fn8hb7047mkby"))))
7610c3ca
KK
289 (build-system python-build-system)
290 (native-inputs
44ce3ebb 291 `(("python-attrs" ,python-attrs))) ; for tests
7610c3ca
KK
292 (inputs
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)
44ce3ebb
MR
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)
7610c3ca 303 ("python-pyqt" ,python-pyqt)
44ce3ebb
MR
304 ;; While qtwebengine is provided by python-pyqtwebengine, it's
305 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
306 ("qtwebengine" ,qtwebengine)))
7610c3ca 307 (arguments
44ce3ebb
MR
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.
7e232d02 311 #:tests? #f
7610c3ca
KK
312 #:phases
313 (modify-phases %standard-phases
44ce3ebb
MR
314 (add-before 'check 'set-env-offscreen
315 (lambda _
316 (setenv "QT_QPA_PLATFORM" "offscreen")
317 #t))
7610c3ca
KK
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")))
7610c3ca
KK
323 (install-file "doc/qutebrowser.1"
324 (string-append out "/share/man/man1"))
7610c3ca
KK
325 (for-each
326 (lambda (i)
327 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
328 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
329 hicolor i i)))
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"))
d7c58c3e 335 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
7610c3ca
KK
336 (("Exec=qutebrowser")
337 (string-append "Exec=" out "/bin/qutebrowser")))
d7c58c3e 338 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
44ce3ebb
MR
339 #t)))
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")))
347 (wrap-program bin
348 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
7610c3ca
KK
349 #t))))))
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
44ce3ebb 353GUI. It is based on PyQt5 and QtWebEngine.")
7610c3ca 354 (license license:gpl3+)))
f0c817a7
TE
355
356(define-public vimb
357 (package
358 (name "vimb")
0ed75a5f 359 (version "3.6.0")
f0c817a7
TE
360 (source
361 (origin
362 (method git-fetch)
363 (uri (git-reference
364 (url "https://github.com/fanglingsu/vimb/")
365 (commit version)))
366 (sha256
0ed75a5f 367 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
f0c817a7
TE
368 (file-name (git-file-name name version))))
369 (build-system glib-or-gtk-build-system)
370 (arguments
f51905a4 371 '(#:tests? #f ; no tests
f0c817a7
TE
372 #:make-flags (list "CC=gcc"
373 "DESTDIR="
374 (string-append "PREFIX=" %output))
375 #:phases
376 (modify-phases %standard-phases
377 (delete 'configure))))
378 (inputs
379 `(("glib-networking" ,glib-networking)
380 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
381 ("webkitgtk" ,webkitgtk)))
382 (native-inputs
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
387the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
388vim editor and also easily configurable during runtime. Vimb is mostly keyboard
389driven and does not detract you from your daily work.")
390 (license license:gpl3+)))
18974c1e 391
aae704dd 392(define next-gtk-webkit
b96bd821
PN
393 (package
394 (name "next-gtk-webkit")
90a31c73 395 (version "1.4.0")
b96bd821
PN
396 (source
397 (origin
398 (method git-fetch)
399 (uri (git-reference
1be4989d
PN
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")
b96bd821
PN
403 (commit version)))
404 (sha256
405 (base32
90a31c73 406 "1gkmr746rqqg94698a051gv79fblc8n9dq0zg04llba44adhpmjl"))
b96bd821
PN
407 (file-name (git-file-name "next" version))))
408 (build-system glib-or-gtk-build-system)
409 (arguments
410 `(#:tests? #f ; no tests
411 #:make-flags (list "gtk-webkit"
f85ca6ed 412 "CC=gcc"
b96bd821
PN
413 (string-append "PREFIX=" %output))
414 #:phases
415 (modify-phases %standard-phases
416 (delete 'configure)
417 (replace 'install
418 (lambda* (#:key (make-flags '()) #:allow-other-keys)
419 (apply invoke "make" "install-gtk-webkit" make-flags))))))
420 (inputs
421 `(("glib-networking" ,glib-networking)
422 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
f85ca6ed 423 ("webkitgtk" ,webkitgtk)))
b96bd821 424 (native-inputs
f85ca6ed 425 `(("pkg-config" ,pkg-config)))
b96bd821
PN
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
18974c1e
PN
429inspired by Emacs and designed for power users. The application has familiar
430key-bindings, is fully configurable and extensible in Lisp, and has powerful
431features for productive professionals.")
b96bd821 432 (license license:bsd-3)))
acad932e 433
b2455573 434(define sbcl-next-download-manager
acad932e
PN
435 (package
436 (inherit next-gtk-webkit)
b2455573 437 (name "sbcl-next-download-manager")
acad932e 438 (build-system asdf-build-system/sbcl)
acad932e 439 (arguments
b2455573
PN
440 `(#:tests? #f ; Need online access.
441 #:asd-file "next.asd"
1be4989d 442 #:asd-system-name "next/download-manager"))
acad932e 443 (inputs
754ee708 444 `(("cl-ppcre" ,sbcl-cl-ppcre)
b2455573 445 ("dexador" ,sbcl-dexador)
338defe0 446 ("log4cl" ,sbcl-log4cl)
b2455573
PN
447 ("lparallel" ,sbcl-lparallel)
448 ("quri" ,sbcl-quri)
449 ("str" ,sbcl-cl-str)))
450 (native-inputs
754ee708
PN
451 `(("trivial-features" ,sbcl-trivial-features)
452 ("prove-asdf" ,sbcl-prove-asdf)))
b2455573
PN
453 (synopsis "Infinitely extensible web-browser (download manager)")))
454
754ee708
PN
455(define sbcl-next-ring
456 (package
457 (inherit next-gtk-webkit)
458 (name "sbcl-next-ring")
459 (build-system asdf-build-system/sbcl)
460 (arguments
461 `(#:tests? #t
462 #:asd-file "next.asd"
463 #:asd-system-name "next/ring"))
464 (native-inputs
465 `(("trivial-features" ,sbcl-trivial-features)
466 ("prove-asdf" ,sbcl-prove-asdf)))
467 (synopsis "Infinitely extensible web-browser (ring)")))
468
ab0ede51
PN
469(define sbcl-next-history-tree
470 (package
471 (inherit next-gtk-webkit)
472 (name "sbcl-next-history-tree")
473 (build-system asdf-build-system/sbcl)
474 (arguments
475 `(#:tests? #t
476 #:asd-file "next.asd"
477 #:asd-system-name "next/history-tree"))
478 (native-inputs
479 `(("trivial-features" ,sbcl-trivial-features)
480 ("prove-asdf" ,sbcl-prove-asdf)))
481 (synopsis "Infinitely extensible web-browser (history-tree)")))
482
483(define sbcl-next-password-manager
484 (package
485 (inherit next-gtk-webkit)
486 (name "sbcl-next-password-manager")
487 (build-system asdf-build-system/sbcl)
488 (arguments
489 `(#:tests? #t
490 #:asd-file "next.asd"
491 #:asd-system-name "next/password-manager"))
492 (inputs
493 `(("bordeaux-threads" ,sbcl-bordeaux-threads)
494 ("cl-annot" ,sbcl-cl-annot)
495 ("cl-ppcre" ,sbcl-cl-ppcre)
496 ("str" ,sbcl-cl-str)
497 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
498 (native-inputs
499 `(("trivial-features" ,sbcl-trivial-features)
500 ("prove-asdf" ,sbcl-prove-asdf)))
501 (synopsis "Infinitely extensible web-browser (password manager)")))
502
90a31c73
PN
503(define sbcl-next-hooks
504 (package
505 (inherit next-gtk-webkit)
506 (name "sbcl-next-hooks")
507 (build-system asdf-build-system/sbcl)
508 (arguments
509 `(#:tests? #t
510 #:asd-file "next.asd"
511 #:asd-system-name "next/hooks"))
512 (inputs
513 `(("alexandria" ,sbcl-alexandria)
78cb6c34 514 ("serapeum" ,sbcl-serapeum)))
90a31c73
PN
515 (native-inputs
516 `(("trivial-features" ,sbcl-trivial-features)
517 ("prove-asdf" ,sbcl-prove-asdf)))
518 (synopsis "Infinitely extensible web-browser (hooks)")))
519
01bb2e30
PN
520(define-public next
521 (let ((version (package-version next-gtk-webkit)))
522 (package
523 (inherit next-gtk-webkit)
524 (name "next")
525 (build-system asdf-build-system/sbcl)
526 (outputs '("out" "lib"))
527 (arguments
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\"")))
537 #t))
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 "\")"))))
549 #t))
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
acad932e 554 lib
01bb2e30
PN
555 "/lib/sbcl/next.fasl"))
556 (define expected-fasl (string-append
557 lib
558 "/lib/sbcl/next--system.fasl"))
559 (copy-file actual-fasl expected-fasl)
560 #t))
561 (add-after 'create-symlinks 'build-program
562 (lambda* (#:key outputs #:allow-other-keys)
563 (build-program
564 (string-append (assoc-ref outputs "out") "/bin/next")
565 outputs
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
572 ;; file.
573 (lambda* (#:key outputs #:allow-other-keys)
574 (with-output-to-file "version"
575 (lambda _
576 (format #t "~a" ,(package-version next-gtk-webkit))))
577 (invoke "make" "install-assets"
578 (string-append "PREFIX="
579 (assoc-ref outputs "out"))))))))
580 (inputs
754ee708 581 `(("alexandria" ,sbcl-alexandria)
01bb2e30 582 ("bordeaux-threads" ,sbcl-bordeaux-threads)
754ee708 583 ("cl-annot" ,sbcl-cl-annot)
ab0ede51 584 ("cl-ansi-text" ,sbcl-cl-ansi-text)
01bb2e30
PN
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)
ab0ede51 590 ("cl-prevalence" ,sbcl-cl-prevalence)
01bb2e30
PN
591 ("closer-mop" ,sbcl-closer-mop)
592 ("dbus" ,cl-dbus)
593 ("dexador" ,sbcl-dexador)
594 ("ironclad" ,sbcl-ironclad)
754ee708 595 ("local-time" ,sbcl-local-time)
01bb2e30
PN
596 ("log4cl" ,sbcl-log4cl)
597 ("lparallel" ,sbcl-lparallel)
598 ("mk-string-metrics" ,sbcl-mk-string-metrics)
599 ("parenscript" ,sbcl-parenscript)
90a31c73 600 ("plump" ,sbcl-plump)
01bb2e30 601 ("quri" ,sbcl-quri)
90a31c73 602 ("serapeum" ,sbcl-serapeum)
01bb2e30
PN
603 ("sqlite" ,sbcl-cl-sqlite)
604 ("str" ,sbcl-cl-str)
90a31c73 605 ("swank" ,sbcl-slime-swank)
01bb2e30
PN
606 ("trivia" ,sbcl-trivia)
607 ("trivial-clipboard" ,sbcl-trivial-clipboard)
608 ("unix-opts" ,sbcl-unix-opts)
609 ;; Local deps
754ee708
PN
610 ("next-gtk-webkit" ,next-gtk-webkit)
611 ("next-download-manager" ,sbcl-next-download-manager)
ab0ede51
PN
612 ("next-ring" ,sbcl-next-ring)
613 ("next-history-tree" ,sbcl-next-history-tree)
90a31c73
PN
614 ("next-password-manager" ,sbcl-next-password-manager)
615 ("next-hooks" ,sbcl-next-hooks)))
01bb2e30 616 (native-inputs
754ee708 617 `(("trivial-features" ,sbcl-trivial-features)
90a31c73 618 ("trivial-types" ,sbcl-trivial-types)
754ee708 619 ("prove-asdf" ,sbcl-prove-asdf)))
01bb2e30
PN
620 (synopsis "Infinitely extensible web-browser (with Lisp development files)"))))
621
622(define-public sbcl-next
623 (deprecated-package "sbcl-next" next))