gnu: sbcl-cl-cffi-gtk: Update to 20200417.
[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>
e71c7f6a 13;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
c21a2562
KY
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
0c3953ea 30(define-module (gnu packages web-browsers)
c21a2562
KY
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (gnu packages)
e71c7f6a 34 #:use-module (gnu packages backup)
c21a2562 35 #:use-module (gnu packages compression)
7610c3ca 36 #:use-module (gnu packages documentation)
c21a2562
KY
37 #:use-module (gnu packages fltk)
38 #:use-module (gnu packages fontutils)
e71c7f6a
RG
39 #:use-module (gnu packages freedesktop)
40 #:use-module (gnu packages glib)
700987f7 41 #:use-module (gnu packages gtk)
c5196ac7 42 #:use-module (gnu packages gnupg)
8bdc36d4 43 #:use-module (gnu packages libevent)
c5196ac7 44 #:use-module (gnu packages libidn)
acad932e 45 #:use-module (gnu packages lisp)
88f06fd0 46 #:use-module (gnu packages lisp-xyz)
700987f7 47 #:use-module (gnu packages lua)
48 #:use-module (gnu packages gnome)
e71c7f6a 49 #:use-module (gnu packages gnome-xyz)
c5196ac7 50 #:use-module (gnu packages ncurses)
c21a2562
KY
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
7610c3ca 53 #:use-module (gnu packages python)
1b2f753d 54 #:use-module (gnu packages python-web)
44d10b1f 55 #:use-module (gnu packages python-xyz)
7610c3ca 56 #:use-module (gnu packages qt)
c21a2562 57 #:use-module (gnu packages image)
cd0322a3 58 #:use-module (gnu packages sqlite)
c21a2562 59 #:use-module (gnu packages tls)
700987f7 60 #:use-module (gnu packages webkit)
c21a2562 61 #:use-module (gnu packages xorg)
194d1ec3 62 #:use-module (gnu packages gcc)
c21a2562 63 #:use-module (guix download)
f0c817a7 64 #:use-module (guix git-download)
e71c7f6a 65 #:use-module (guix build-system cmake)
7610c3ca 66 #:use-module (guix build-system gnu)
700987f7 67 #:use-module (guix build-system glib-or-gtk)
acad932e
PN
68 #:use-module (guix build-system python)
69 #:use-module (guix build-system asdf))
c21a2562 70
e71c7f6a
RG
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.
122It features integration with GTK+3, configurable web search engine, bookmark
123management, extensions such as advertisement blocker and colorful tabs.")
124 (home-page "https://www.midori-browser.org")
125 (license license:lgpl2.1+)))
126
c21a2562
KY
127(define-public dillo
128 (package
129 (name "dillo")
130 (version "3.0.5")
131 (source (origin
132 (method url-fetch)
62418049
TGR
133 (uri (string-append "https://www.dillo.org/download/"
134 "dillo-" version ".tar.bz2"))
c21a2562
KY
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)
5d3db373 149 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
c21a2562
KY
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
154older or slower computers and embedded systems.")
62418049 155 (home-page "https://www.dillo.org")
c21a2562 156 (license license:gpl3+)))
7610c3ca 157
8bdc36d4
KK
158(define-public links
159 (package
160 (name "links")
7696af42 161 (version "2.20.2")
8bdc36d4
KK
162 (source (origin
163 (method url-fetch)
164 (uri (string-append "http://links.twibright.com/download/"
5dcd4007 165 "links-" version ".tar.bz2"))
7696af42 166 (sha256
8bdc36d4 167 (base32
7696af42 168 "097ll98ympzfx7qfdyhc52yzvsp167x5nnjs6v8ih496wv80fksb"))))
8bdc36d4
KK
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"))
b8b34be6
TGR
184 (invoke "./configure"
185 (string-append "--prefix=" out)
186 "--enable-graphics")
187 #t))))))
8bdc36d4
KK
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
198features 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
700987f7 209(define-public luakit
210 (package
211 (name "luakit")
37956778 212 (version "2.1")
700987f7 213 (source (origin
320ba590
EF
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))
700987f7 219 (sha256
220 (base32
320ba590 221 "1qa90caxv1k6ak88fn0a7n7h0c4iv8szw6zn2axch8ig83i86az2"))))
700987f7 222 (inputs
b42b5afd 223 `(("lua-5.1" ,lua-5.1)
700987f7 224 ("gtk+" ,gtk+)
b42b5afd
MW
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)))
700987f7 231 (native-inputs
b42b5afd 232 `(("pkg-config" ,pkg-config)))
700987f7 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
f9984535
RM
263 "/lib/lua/5.1/?.so;;")))
264 `("XDG_CONFIG_DIRS" prefix
265 (,(string-append luakit "/etc/xdg/"))))
700987f7 266 #t))))))
267 (synopsis "Fast, lightweight, and simple browser based on WebKit")
268 (description "Luakit is a fast, lightweight, and simple to use
269micro-browser framework extensible by Lua using the WebKit web content engine
270and the GTK+ toolkit.")
271 (home-page "https://luakit.github.io/")
272 (license license:gpl3+)))
273
c5196ac7
KK
274(define-public lynx
275 (package
276 (name "lynx")
781e5158 277 (version "2.8.9rel.1")
c5196ac7
KK
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
781e5158 285 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
c5196ac7
KK
286 (build-system gnu-build-system)
287 (native-inputs `(("pkg-config" ,pkg-config)
288 ("perl" ,perl)))
289 (inputs `(("ncurses" ,ncurses)
290 ("libidn" ,libidn)
0e4cee0e 291 ("openssl" ,openssl)
c5196ac7
KK
292 ("libgcrypt" ,libgcrypt)
293 ("unzip" ,unzip)
294 ("zlib" ,zlib)
295 ("gzip" ,gzip)
296 ("bzip2" ,bzip2)))
297 (arguments
298 `(#:configure-flags
0e4cee0e 299 (let ((openssl (assoc-ref %build-inputs "openssl")))
c5196ac7
KK
300 `("--with-pkg-config"
301 "--with-screen=ncurses"
302 "--with-zlib"
303 "--with-bzlib"
0e4cee0e 304 ,(string-append "--with-ssl=" openssl)
c5196ac7
KK
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
dc1d3cde
KK
314 #:phases
315 (modify-phases %standard-phases
e3cea0d5
LF
316 (add-before 'configure 'set-makefile-shell
317 (lambda _ (substitute* "po/makefile.inn"
318 (("/bin/sh") (which "sh")))
319 #t))
dc1d3cde
KK
320 (replace 'install
321 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b8b34be6
TGR
322 (apply invoke "make" "install-full" make-flags)
323 #t)))))
c5196ac7
KK
324 (synopsis "Text Web Browser")
325 (description
326 "Lynx is a fully-featured World Wide Web (WWW) client for users running
327cursor-addressable, character-cell display devices. It will display Hypertext
328Markup Language (HTML) documents containing links to files on the local
329system, as well as files on remote systems running http, gopher, ftp, wais,
330nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
331the WWW, or to build information systems intended primarily for local
332access.")
9c2917f9 333 (home-page "https://lynx.invisible-island.net/")
faf2843b
EF
334 ;; This was fixed in 2.8.9dev.10.
335 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
c5196ac7
KK
336 (license license:gpl2)))
337
7610c3ca
KK
338(define-public qutebrowser
339 (package
340 (name "qutebrowser")
61586ce9 341 (version "1.11.0")
7610c3ca
KK
342 (source
343 (origin
344 (method url-fetch)
a066e289 345 (uri (string-append "https://github.com/qutebrowser/"
7610c3ca
KK
346 "qutebrowser/releases/download/v" version "/"
347 "qutebrowser-" version ".tar.gz"))
348 (sha256
349 (base32
61586ce9 350 "0b0qlki9bp9mm41lrh6rc6qqvm4nsz8da63sby3a1f2xm9b9vvg2"))))
7610c3ca
KK
351 (build-system python-build-system)
352 (native-inputs
44ce3ebb 353 `(("python-attrs" ,python-attrs))) ; for tests
7610c3ca
KK
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)
44ce3ebb
MR
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)
7610c3ca 365 ("python-pyqt" ,python-pyqt)
44ce3ebb
MR
366 ;; While qtwebengine is provided by python-pyqtwebengine, it's
367 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
368 ("qtwebengine" ,qtwebengine)))
7610c3ca 369 (arguments
44ce3ebb
MR
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.
7e232d02 373 #:tests? #f
7610c3ca
KK
374 #:phases
375 (modify-phases %standard-phases
44ce3ebb
MR
376 (add-before 'check 'set-env-offscreen
377 (lambda _
378 (setenv "QT_QPA_PLATFORM" "offscreen")
379 #t))
7610c3ca
KK
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")))
7610c3ca
KK
385 (install-file "doc/qutebrowser.1"
386 (string-append out "/share/man/man1"))
7610c3ca
KK
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"))
d7c58c3e 397 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
7610c3ca
KK
398 (("Exec=qutebrowser")
399 (string-append "Exec=" out "/bin/qutebrowser")))
d7c58c3e 400 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
44ce3ebb
MR
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)))
7610c3ca
KK
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
44ce3ebb 415GUI. It is based on PyQt5 and QtWebEngine.")
7610c3ca 416 (license license:gpl3+)))
f0c817a7
TE
417
418(define-public vimb
419 (package
420 (name "vimb")
0ed75a5f 421 (version "3.6.0")
f0c817a7
TE
422 (source
423 (origin
424 (method git-fetch)
425 (uri (git-reference
426 (url "https://github.com/fanglingsu/vimb/")
427 (commit version)))
428 (sha256
0ed75a5f 429 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
f0c817a7
TE
430 (file-name (git-file-name name version))))
431 (build-system glib-or-gtk-build-system)
432 (arguments
f51905a4 433 '(#:tests? #f ; no tests
f0c817a7
TE
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
449the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
450vim editor and also easily configurable during runtime. Vimb is mostly keyboard
451driven and does not detract you from your daily work.")
452 (license license:gpl3+)))
18974c1e 453
aae704dd 454(define next-gtk-webkit
b96bd821
PN
455 (package
456 (name "next-gtk-webkit")
676e21e4 457 (version "1.5.0")
b96bd821
PN
458 (source
459 (origin
460 (method git-fetch)
461 (uri (git-reference
1be4989d
PN
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")
b96bd821
PN
465 (commit version)))
466 (sha256
467 (base32
676e21e4 468 "1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy"))
b96bd821
PN
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"
f85ca6ed 474 "CC=gcc"
b96bd821
PN
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)
f85ca6ed 485 ("webkitgtk" ,webkitgtk)))
b96bd821 486 (native-inputs
f85ca6ed 487 `(("pkg-config" ,pkg-config)))
b96bd821 488 (home-page "https://next.atlas.engineer")
676e21e4 489 (synopsis "Extensible web-browser in Common Lisp")
b96bd821 490 (description "Next is a keyboard-oriented, extensible web-browser
676e21e4
PN
491designed for power users. The application has familiar Emacs and VI
492key-bindings and is fully configurable and extensible in Common Lisp.")
b96bd821 493 (license license:bsd-3)))
acad932e 494
b2455573 495(define sbcl-next-download-manager
acad932e
PN
496 (package
497 (inherit next-gtk-webkit)
b2455573 498 (name "sbcl-next-download-manager")
acad932e 499 (build-system asdf-build-system/sbcl)
acad932e 500 (arguments
b2455573
PN
501 `(#:tests? #f ; Need online access.
502 #:asd-file "next.asd"
1be4989d 503 #:asd-system-name "next/download-manager"))
acad932e 504 (inputs
754ee708 505 `(("cl-ppcre" ,sbcl-cl-ppcre)
b2455573 506 ("dexador" ,sbcl-dexador)
338defe0 507 ("log4cl" ,sbcl-log4cl)
b2455573
PN
508 ("lparallel" ,sbcl-lparallel)
509 ("quri" ,sbcl-quri)
510 ("str" ,sbcl-cl-str)))
511 (native-inputs
754ee708
PN
512 `(("trivial-features" ,sbcl-trivial-features)
513 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 514 (synopsis "Extensible web-browser in Common Lisp (download manager)")))
b2455573 515
754ee708
PN
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)))
676e21e4 528 (synopsis "Extensible web-browser in Common Lisp (ring)")))
754ee708 529
ab0ede51
PN
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)))
676e21e4 542 (synopsis "Extensible web-browser in Common Lisp (history-tree)")))
ab0ede51
PN
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)))
676e21e4 562 (synopsis "Extensible web-browser in Common Lisp (password manager)")))
ab0ede51 563
90a31c73
PN
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)
78cb6c34 575 ("serapeum" ,sbcl-serapeum)))
90a31c73
PN
576 (native-inputs
577 `(("trivial-features" ,sbcl-trivial-features)
578 ("prove-asdf" ,sbcl-prove-asdf)))
579 (synopsis "Infinitely extensible web-browser (hooks)")))
580
01bb2e30
PN
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
acad932e 615 lib
01bb2e30
PN
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="
262d6ed4
PN
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)")))))))
01bb2e30 651 (inputs
754ee708 652 `(("alexandria" ,sbcl-alexandria)
01bb2e30 653 ("bordeaux-threads" ,sbcl-bordeaux-threads)
754ee708 654 ("cl-annot" ,sbcl-cl-annot)
ab0ede51 655 ("cl-ansi-text" ,sbcl-cl-ansi-text)
01bb2e30
PN
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)
ab0ede51 661 ("cl-prevalence" ,sbcl-cl-prevalence)
01bb2e30
PN
662 ("closer-mop" ,sbcl-closer-mop)
663 ("dbus" ,cl-dbus)
664 ("dexador" ,sbcl-dexador)
665 ("ironclad" ,sbcl-ironclad)
754ee708 666 ("local-time" ,sbcl-local-time)
01bb2e30
PN
667 ("log4cl" ,sbcl-log4cl)
668 ("lparallel" ,sbcl-lparallel)
669 ("mk-string-metrics" ,sbcl-mk-string-metrics)
670 ("parenscript" ,sbcl-parenscript)
90a31c73 671 ("plump" ,sbcl-plump)
01bb2e30 672 ("quri" ,sbcl-quri)
90a31c73 673 ("serapeum" ,sbcl-serapeum)
01bb2e30
PN
674 ("sqlite" ,sbcl-cl-sqlite)
675 ("str" ,sbcl-cl-str)
90a31c73 676 ("swank" ,sbcl-slime-swank)
01bb2e30
PN
677 ("trivia" ,sbcl-trivia)
678 ("trivial-clipboard" ,sbcl-trivial-clipboard)
679 ("unix-opts" ,sbcl-unix-opts)
680 ;; Local deps
754ee708
PN
681 ("next-gtk-webkit" ,next-gtk-webkit)
682 ("next-download-manager" ,sbcl-next-download-manager)
ab0ede51
PN
683 ("next-ring" ,sbcl-next-ring)
684 ("next-history-tree" ,sbcl-next-history-tree)
90a31c73
PN
685 ("next-password-manager" ,sbcl-next-password-manager)
686 ("next-hooks" ,sbcl-next-hooks)))
01bb2e30 687 (native-inputs
754ee708 688 `(("trivial-features" ,sbcl-trivial-features)
90a31c73 689 ("trivial-types" ,sbcl-trivial-types)
754ee708 690 ("prove-asdf" ,sbcl-prove-asdf)))
676e21e4 691 (synopsis "Extensible web-browser in Common Lisp"))))
01bb2e30
PN
692
693(define-public sbcl-next
694 (deprecated-package "sbcl-next" next))