gnu: mumi: Update to 0.0.0-12.bb2fe92.
[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")
676e21e4 395 (version "1.5.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
676e21e4 406 "1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy"))
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 426 (home-page "https://next.atlas.engineer")
676e21e4 427 (synopsis "Extensible web-browser in Common Lisp")
b96bd821 428 (description "Next is a keyboard-oriented, extensible web-browser
676e21e4
PN
429designed for power users. The application has familiar Emacs and VI
430key-bindings and is fully configurable and extensible in Common Lisp.")
b96bd821 431 (license license:bsd-3)))
acad932e 432
b2455573 433(define sbcl-next-download-manager
acad932e
PN
434 (package
435 (inherit next-gtk-webkit)
b2455573 436 (name "sbcl-next-download-manager")
acad932e 437 (build-system asdf-build-system/sbcl)
acad932e 438 (arguments
b2455573
PN
439 `(#:tests? #f ; Need online access.
440 #:asd-file "next.asd"
1be4989d 441 #:asd-system-name "next/download-manager"))
acad932e 442 (inputs
754ee708 443 `(("cl-ppcre" ,sbcl-cl-ppcre)
b2455573 444 ("dexador" ,sbcl-dexador)
338defe0 445 ("log4cl" ,sbcl-log4cl)
b2455573
PN
446 ("lparallel" ,sbcl-lparallel)
447 ("quri" ,sbcl-quri)
448 ("str" ,sbcl-cl-str)))
449 (native-inputs
754ee708
PN
450 `(("trivial-features" ,sbcl-trivial-features)
451 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 452 (synopsis "Extensible web-browser in Common Lisp (download manager)")))
b2455573 453
754ee708
PN
454(define sbcl-next-ring
455 (package
456 (inherit next-gtk-webkit)
457 (name "sbcl-next-ring")
458 (build-system asdf-build-system/sbcl)
459 (arguments
460 `(#:tests? #t
461 #:asd-file "next.asd"
462 #:asd-system-name "next/ring"))
463 (native-inputs
464 `(("trivial-features" ,sbcl-trivial-features)
465 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 466 (synopsis "Extensible web-browser in Common Lisp (ring)")))
754ee708 467
ab0ede51
PN
468(define sbcl-next-history-tree
469 (package
470 (inherit next-gtk-webkit)
471 (name "sbcl-next-history-tree")
472 (build-system asdf-build-system/sbcl)
473 (arguments
474 `(#:tests? #t
475 #:asd-file "next.asd"
476 #:asd-system-name "next/history-tree"))
477 (native-inputs
478 `(("trivial-features" ,sbcl-trivial-features)
479 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 480 (synopsis "Extensible web-browser in Common Lisp (history-tree)")))
ab0ede51
PN
481
482(define sbcl-next-password-manager
483 (package
484 (inherit next-gtk-webkit)
485 (name "sbcl-next-password-manager")
486 (build-system asdf-build-system/sbcl)
487 (arguments
488 `(#:tests? #t
489 #:asd-file "next.asd"
490 #:asd-system-name "next/password-manager"))
491 (inputs
492 `(("bordeaux-threads" ,sbcl-bordeaux-threads)
493 ("cl-annot" ,sbcl-cl-annot)
494 ("cl-ppcre" ,sbcl-cl-ppcre)
495 ("str" ,sbcl-cl-str)
496 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
497 (native-inputs
498 `(("trivial-features" ,sbcl-trivial-features)
499 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 500 (synopsis "Extensible web-browser in Common Lisp (password manager)")))
ab0ede51 501
90a31c73
PN
502(define sbcl-next-hooks
503 (package
504 (inherit next-gtk-webkit)
505 (name "sbcl-next-hooks")
506 (build-system asdf-build-system/sbcl)
507 (arguments
508 `(#:tests? #t
509 #:asd-file "next.asd"
510 #:asd-system-name "next/hooks"))
511 (inputs
512 `(("alexandria" ,sbcl-alexandria)
78cb6c34 513 ("serapeum" ,sbcl-serapeum)))
90a31c73
PN
514 (native-inputs
515 `(("trivial-features" ,sbcl-trivial-features)
516 ("prove-asdf" ,sbcl-prove-asdf)))
517 (synopsis "Infinitely extensible web-browser (hooks)")))
518
01bb2e30
PN
519(define-public next
520 (let ((version (package-version next-gtk-webkit)))
521 (package
522 (inherit next-gtk-webkit)
523 (name "next")
524 (build-system asdf-build-system/sbcl)
525 (outputs '("out" "lib"))
526 (arguments
527 `(#:tests? #f ; no tests
528 #:asd-system-name "next"
529 #:phases (modify-phases %standard-phases
530 (add-after 'unpack 'patch-platform-port-path
531 (lambda* (#:key inputs #:allow-other-keys)
532 (substitute* "source/ports/gtk-webkit.lisp"
533 (("\"next-gtk-webkit\"")
534 (string-append "\"" (assoc-ref inputs "next-gtk-webkit")
535 "/bin/next-gtk-webkit\"")))
536 #t))
537 (add-after 'patch-platform-port-path 'patch-version
538 ;; When the version is not just dot-separated numerals
539 ;; (e.g. a git-commit version), Guix modifies the .asd with
540 ;; an illegal version number, and then Next fails to query
541 ;; it. So we hard-code it here.
542 (lambda* (#:key inputs #:allow-other-keys)
543 (let ((version (format #f "~a" ,version)))
544 (substitute* "source/global.lisp"
545 (("version\\)\\)\\)")
546 (string-append "version)))
547(setf +version+ \"" version "\")"))))
548 #t))
549 (add-before 'cleanup 'move-bundle
550 (lambda* (#:key outputs #:allow-other-keys)
551 (define lib (assoc-ref outputs "lib"))
552 (define actual-fasl (string-append
acad932e 553 lib
01bb2e30
PN
554 "/lib/sbcl/next.fasl"))
555 (define expected-fasl (string-append
556 lib
557 "/lib/sbcl/next--system.fasl"))
558 (copy-file actual-fasl expected-fasl)
559 #t))
560 (add-after 'create-symlinks 'build-program
561 (lambda* (#:key outputs #:allow-other-keys)
562 (build-program
563 (string-append (assoc-ref outputs "out") "/bin/next")
564 outputs
565 #:entry-program '((next:entry-point) 0))))
566 (add-before 'build 'install-assets
567 ;; Since the ASDF build system generates a new .asd with a
568 ;; possibly suffixed and thus illegal version number, assets
569 ;; should not be installed after the 'build phase or else
570 ;; the illegal version will result in NIL in the .desktop
571 ;; file.
572 (lambda* (#:key outputs #:allow-other-keys)
573 (with-output-to-file "version"
574 (lambda _
575 (format #t "~a" ,(package-version next-gtk-webkit))))
576 (invoke "make" "install-assets"
577 (string-append "PREFIX="
262d6ed4
PN
578 (assoc-ref outputs "out")))))
579 (add-after 'unpack 'fix-lambda-list
580 ;; Starting from SBCL 2.0.2, Next 1.5.0 won't build
581 ;; because of a weird lambda list type.
582 (lambda _
583 (substitute* "source/keymap.lisp"
584 (("^\\(declaim .* define-key\\)\\)") ""))
585 (substitute* "source/search-buffer.lisp"
586 (("define-key :keymap keymap \"C-s\"") "define-key \"C-s\"")
587 (("\\(update-selection-highlight-hint :follow t :scroll t\\)\\)\\)")
588 "(update-selection-highlight-hint :follow t :scroll t)) :keymap keymap)")))))))
01bb2e30 589 (inputs
754ee708 590 `(("alexandria" ,sbcl-alexandria)
01bb2e30 591 ("bordeaux-threads" ,sbcl-bordeaux-threads)
754ee708 592 ("cl-annot" ,sbcl-cl-annot)
ab0ede51 593 ("cl-ansi-text" ,sbcl-cl-ansi-text)
01bb2e30
PN
594 ("cl-css" ,sbcl-cl-css)
595 ("cl-json" ,sbcl-cl-json)
596 ("cl-markup" ,sbcl-cl-markup)
597 ("cl-ppcre" ,sbcl-cl-ppcre)
598 ("cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode)
ab0ede51 599 ("cl-prevalence" ,sbcl-cl-prevalence)
01bb2e30
PN
600 ("closer-mop" ,sbcl-closer-mop)
601 ("dbus" ,cl-dbus)
602 ("dexador" ,sbcl-dexador)
603 ("ironclad" ,sbcl-ironclad)
754ee708 604 ("local-time" ,sbcl-local-time)
01bb2e30
PN
605 ("log4cl" ,sbcl-log4cl)
606 ("lparallel" ,sbcl-lparallel)
607 ("mk-string-metrics" ,sbcl-mk-string-metrics)
608 ("parenscript" ,sbcl-parenscript)
90a31c73 609 ("plump" ,sbcl-plump)
01bb2e30 610 ("quri" ,sbcl-quri)
90a31c73 611 ("serapeum" ,sbcl-serapeum)
01bb2e30
PN
612 ("sqlite" ,sbcl-cl-sqlite)
613 ("str" ,sbcl-cl-str)
90a31c73 614 ("swank" ,sbcl-slime-swank)
01bb2e30
PN
615 ("trivia" ,sbcl-trivia)
616 ("trivial-clipboard" ,sbcl-trivial-clipboard)
617 ("unix-opts" ,sbcl-unix-opts)
618 ;; Local deps
754ee708
PN
619 ("next-gtk-webkit" ,next-gtk-webkit)
620 ("next-download-manager" ,sbcl-next-download-manager)
ab0ede51
PN
621 ("next-ring" ,sbcl-next-ring)
622 ("next-history-tree" ,sbcl-next-history-tree)
90a31c73
PN
623 ("next-password-manager" ,sbcl-next-password-manager)
624 ("next-hooks" ,sbcl-next-hooks)))
01bb2e30 625 (native-inputs
754ee708 626 `(("trivial-features" ,sbcl-trivial-features)
90a31c73 627 ("trivial-types" ,sbcl-trivial-types)
754ee708 628 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 629 (synopsis "Extensible web-browser in Common Lisp"))))
01bb2e30
PN
630
631(define-public sbcl-next
632 (deprecated-package "sbcl-next" next))