gnu: facter: Update to 4.0.33.
[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>
9605af1a 7;;; Copyright © 2018, 2019, 2020 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>
5b4db516 14;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
cc0aaf20 15;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
c21a2562
KY
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
0c3953ea 32(define-module (gnu packages web-browsers)
dfb99268
TGR
33 #:use-module (guix build-system asdf)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system go)
38 #:use-module (guix build-system python)
39 #:use-module (guix download)
40 #:use-module (guix git-download)
c21a2562
KY
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (guix packages)
43 #:use-module (gnu packages)
e71c7f6a 44 #:use-module (gnu packages backup)
c21a2562 45 #:use-module (gnu packages compression)
7610c3ca 46 #:use-module (gnu packages documentation)
c21a2562
KY
47 #:use-module (gnu packages fltk)
48 #:use-module (gnu packages fontutils)
e71c7f6a 49 #:use-module (gnu packages freedesktop)
dfb99268 50 #:use-module (gnu packages gcc)
e71c7f6a 51 #:use-module (gnu packages glib)
dfb99268
TGR
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gnome-xyz)
c5196ac7 54 #:use-module (gnu packages gnupg)
dfb99268
TGR
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages image)
8bdc36d4 57 #:use-module (gnu packages libevent)
c5196ac7 58 #:use-module (gnu packages libidn)
4cd05788 59 #:use-module (gnu packages linux)
acad932e 60 #:use-module (gnu packages lisp)
88f06fd0 61 #:use-module (gnu packages lisp-xyz)
700987f7 62 #:use-module (gnu packages lua)
c5196ac7 63 #:use-module (gnu packages ncurses)
c21a2562
KY
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
7610c3ca 66 #:use-module (gnu packages python)
1b2f753d 67 #:use-module (gnu packages python-web)
44d10b1f 68 #:use-module (gnu packages python-xyz)
7610c3ca 69 #:use-module (gnu packages qt)
cd0322a3 70 #:use-module (gnu packages sqlite)
c21a2562 71 #:use-module (gnu packages tls)
700987f7 72 #:use-module (gnu packages webkit)
dfb99268 73 #:use-module (gnu packages xorg))
c21a2562 74
e71c7f6a
RG
75(define-public midori
76 (package
77 (name "midori")
78 (version "9.0")
79 (source
80 (origin
81 (method url-fetch)
82 (uri
83 (string-append "https://github.com/midori-browser/core/releases/"
84 "download/v" version "/" name "-v" version ".tar.gz"))
85 (sha256
86 (base32
87 "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy"))))
88 (build-system cmake-build-system)
89 (arguments
90 `(#:imported-modules
91 (,@%cmake-build-system-modules
92 (guix build glib-or-gtk-build-system))
93 #:modules
94 ((guix build cmake-build-system)
95 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
96 (guix build utils))
97 #:phases
98 (modify-phases %standard-phases
99 (add-after 'install 'glib-or-gtk-compile-schemas
100 (assoc-ref glib-or-gtk:%standard-phases
101 'glib-or-gtk-compile-schemas))
102 (add-after 'install 'glib-or-gtk-wrap
103 (assoc-ref glib-or-gtk:%standard-phases
104 'glib-or-gtk-wrap)))))
105 (native-inputs
106 `(("glib:bin" ,glib "bin")
107 ("gtk+:bin" ,gtk+ "bin")
108 ("intltool" ,intltool)
109 ("pkg-config" ,pkg-config)))
110 (inputs
111 `(("adwaita-icon-theme" ,adwaita-icon-theme)
112 ("gcr" ,gcr)
113 ("glib" ,glib)
114 ("glib-networking" ,glib-networking)
115 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
116 ("gtk+" ,gtk+)
117 ("json-glib" ,json-glib)
118 ("libarchive" ,libarchive)
119 ("libpeas" ,libpeas)
120 ("libsoup" ,libsoup)
121 ("sqlite" ,sqlite)
122 ("vala" ,vala)
123 ("webkitgtk" ,webkitgtk)))
124 (synopsis "Lightweight graphical web browser")
125 (description "@code{Midori} is a lightweight, Webkit-based web browser.
126It features integration with GTK+3, configurable web search engine, bookmark
127management, extensions such as advertisement blocker and colorful tabs.")
128 (home-page "https://www.midori-browser.org")
129 (license license:lgpl2.1+)))
130
c21a2562
KY
131(define-public dillo
132 (package
133 (name "dillo")
134 (version "3.0.5")
135 (source (origin
136 (method url-fetch)
62418049
TGR
137 (uri (string-append "https://www.dillo.org/download/"
138 "dillo-" version ".tar.bz2"))
c21a2562
KY
139 (sha256
140 (base32
141 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
142 (build-system gnu-build-system)
143 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
144 (native-inputs `(("pkg-config" ,pkg-config)))
145 (inputs `(("fltk" ,fltk)
146 ("fontconfig" ,fontconfig)
4bd428a7 147 ("libjpeg" ,libjpeg-turbo)
c21a2562
KY
148 ("libpng" ,libpng)
149 ("libxcursor" ,libxcursor)
150 ("libxft" ,libxft)
151 ("libxi" ,libxi)
152 ("libxinerama" ,libxinerama)
5d3db373 153 ("openssl" ,openssl-1.0) ;XXX try latest openssl for dillo > 3.0.5
c21a2562
KY
154 ("perl" ,perl)
155 ("zlib" ,zlib)))
156 (synopsis "Very small and fast graphical web browser")
157 (description "Dillo is a minimalistic web browser particularly intended for
158older or slower computers and embedded systems.")
62418049 159 (home-page "https://www.dillo.org")
c21a2562 160 (license license:gpl3+)))
7610c3ca 161
8bdc36d4
KK
162(define-public links
163 (package
164 (name "links")
7696af42 165 (version "2.20.2")
8bdc36d4
KK
166 (source (origin
167 (method url-fetch)
168 (uri (string-append "http://links.twibright.com/download/"
5dcd4007 169 "links-" version ".tar.bz2"))
7696af42 170 (sha256
8bdc36d4 171 (base32
7696af42 172 "097ll98ympzfx7qfdyhc52yzvsp167x5nnjs6v8ih496wv80fksb"))))
8bdc36d4
KK
173 (build-system gnu-build-system)
174 (arguments
175 `(#:phases
176 (modify-phases %standard-phases
177 (replace 'configure
178 (lambda* (#:key outputs #:allow-other-keys)
179 ;; The tarball uses a very old version of autconf. It doesn't
180 ;; understand extra flags like `--enable-fast-install', so
181 ;; we need to invoke it with just what it understands.
182 (let ((out (assoc-ref outputs "out")))
183 ;; 'configure' doesn't understand '--host'.
184 ,@(if (%current-target-system)
185 `((setenv "CHOST" ,(%current-target-system)))
186 '())
187 (setenv "CONFIG_SHELL" (which "bash"))
b8b34be6
TGR
188 (invoke "./configure"
189 (string-append "--prefix=" out)
190 "--enable-graphics")
191 #t))))))
4cd05788
TGR
192 (native-inputs `(("linux-libre-headers" ,linux-libre-headers)
193 ("pkg-config" ,pkg-config)))
194 (inputs `(("gpm" ,gpm)
195 ("libevent" ,libevent)
4bd428a7 196 ("libjpeg" ,libjpeg-turbo)
8bdc36d4 197 ("libpng" ,libpng)
77986a6a
TGR
198 ("libtiff" ,libtiff)
199 ("libxt" ,libxt)
200 ("openssl" ,openssl)
201 ("zlib" ,zlib)))
8bdc36d4
KK
202 (synopsis "Text and graphics mode web browser")
203 (description "Links is a graphics and text mode web browser, with many
204features including, tables, builtin image display, bookmarks, SSL and more.")
205 (home-page "http://links.twibright.com")
206 ;; The distribution contains a copy of GPLv2
207 ;; However, the copyright notices simply say:
208 ;; "This file is a part of the Links program, released under GPL."
209 ;; Therefore, under the provisions of Section 9, we can choose
210 ;; any version ever published by the FSF.
211 ;; One file (https.c) contains an exception permitting
212 ;; linking of the program with openssl.
213 (license license:gpl1+)))
214
700987f7 215(define-public luakit
216 (package
217 (name "luakit")
37956778 218 (version "2.1")
700987f7 219 (source (origin
320ba590
EF
220 (method git-fetch)
221 (uri (git-reference
b0e7b699 222 (url "https://github.com/luakit/luakit")
320ba590
EF
223 (commit version)))
224 (file-name (git-file-name name version))
700987f7 225 (sha256
226 (base32
320ba590 227 "1qa90caxv1k6ak88fn0a7n7h0c4iv8szw6zn2axch8ig83i86az2"))))
700987f7 228 (inputs
b42b5afd 229 `(("lua-5.1" ,lua-5.1)
700987f7 230 ("gtk+" ,gtk+)
b42b5afd
MW
231 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
232 ("glib-networking" ,glib-networking)
233 ("lua5.1-filesystem" ,lua5.1-filesystem)
234 ("luajit" ,luajit)
235 ("webkitgtk" ,webkitgtk)
236 ("sqlite" ,sqlite)))
700987f7 237 (native-inputs
b42b5afd 238 `(("pkg-config" ,pkg-config)))
700987f7 239 (build-system glib-or-gtk-build-system)
240 (arguments
241 '(#:make-flags
242 (let ((out (assoc-ref %outputs "out")))
243 (list
244 "CC=gcc"
245 "LUA_BIN_NAME=lua"
246 "DEVELOPMENT_PATHS=0"
247 (string-append "PREFIX=" out)
248 (string-append "XDGPREFIX=" out "/etc/xdg")))
249 #:phases
250 (modify-phases %standard-phases
251 (add-before 'build 'lfs-workaround
252 (lambda _
253 (setenv "LUA_CPATH"
254 (string-append
255 (assoc-ref %build-inputs "lua5.1-filesystem")
256 "/lib/lua/5.1/?.so;;"))
257 #t))
258 (delete 'configure)
259 (delete 'check)
260 (add-after 'install 'wrap
261 (lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((luakit (assoc-ref outputs "out"))
263 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
264 (gtk (assoc-ref inputs "gtk+"))
265 (gtk-share (string-append gtk "/share")))
266 (wrap-program (string-append luakit "/bin/luakit")
267 `("LUA_CPATH" prefix
268 (,(string-append lua5.1-filesystem
f9984535
RM
269 "/lib/lua/5.1/?.so;;")))
270 `("XDG_CONFIG_DIRS" prefix
271 (,(string-append luakit "/etc/xdg/"))))
700987f7 272 #t))))))
273 (synopsis "Fast, lightweight, and simple browser based on WebKit")
274 (description "Luakit is a fast, lightweight, and simple to use
275micro-browser framework extensible by Lua using the WebKit web content engine
276and the GTK+ toolkit.")
277 (home-page "https://luakit.github.io/")
278 (license license:gpl3+)))
279
c5196ac7
KK
280(define-public lynx
281 (package
282 (name "lynx")
781e5158 283 (version "2.8.9rel.1")
c5196ac7
KK
284 (source (origin
285 (method url-fetch)
286 (uri (string-append
287 "http://invisible-mirror.net/archives/lynx/tarballs"
288 "/lynx" version ".tar.bz2"))
289 (sha256
290 (base32
781e5158 291 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
c5196ac7
KK
292 (build-system gnu-build-system)
293 (native-inputs `(("pkg-config" ,pkg-config)
294 ("perl" ,perl)))
295 (inputs `(("ncurses" ,ncurses)
296 ("libidn" ,libidn)
0e4cee0e 297 ("openssl" ,openssl)
c5196ac7
KK
298 ("libgcrypt" ,libgcrypt)
299 ("unzip" ,unzip)
300 ("zlib" ,zlib)
301 ("gzip" ,gzip)
302 ("bzip2" ,bzip2)))
303 (arguments
304 `(#:configure-flags
0e4cee0e 305 (let ((openssl (assoc-ref %build-inputs "openssl")))
c5196ac7
KK
306 `("--with-pkg-config"
307 "--with-screen=ncurses"
308 "--with-zlib"
309 "--with-bzlib"
0e4cee0e 310 ,(string-append "--with-ssl=" openssl)
c5196ac7
KK
311 ;; "--with-socks5" ; XXX TODO
312 "--enable-widec"
313 "--enable-ascii-ctypes"
314 "--enable-local-docs"
315 "--enable-htmlized-cfg"
316 "--enable-gzip-help"
317 "--enable-nls"
318 "--enable-ipv6"))
319 #:tests? #f ; no check target
dc1d3cde
KK
320 #:phases
321 (modify-phases %standard-phases
e3cea0d5
LF
322 (add-before 'configure 'set-makefile-shell
323 (lambda _ (substitute* "po/makefile.inn"
324 (("/bin/sh") (which "sh")))
325 #t))
dc1d3cde
KK
326 (replace 'install
327 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b8b34be6
TGR
328 (apply invoke "make" "install-full" make-flags)
329 #t)))))
c5196ac7
KK
330 (synopsis "Text Web Browser")
331 (description
332 "Lynx is a fully-featured World Wide Web (WWW) client for users running
333cursor-addressable, character-cell display devices. It will display Hypertext
334Markup Language (HTML) documents containing links to files on the local
335system, as well as files on remote systems running http, gopher, ftp, wais,
336nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
337the WWW, or to build information systems intended primarily for local
338access.")
9c2917f9 339 (home-page "https://lynx.invisible-island.net/")
faf2843b
EF
340 ;; This was fixed in 2.8.9dev.10.
341 (properties `((lint-hidden-cve . ("CVE-2016-9179"))))
c5196ac7
KK
342 (license license:gpl2)))
343
7610c3ca
KK
344(define-public qutebrowser
345 (package
346 (name "qutebrowser")
7915e3e1 347 (version "1.13.1")
7610c3ca
KK
348 (source
349 (origin
350 (method url-fetch)
a066e289 351 (uri (string-append "https://github.com/qutebrowser/"
7610c3ca
KK
352 "qutebrowser/releases/download/v" version "/"
353 "qutebrowser-" version ".tar.gz"))
354 (sha256
7915e3e1 355 (base32 "1n72dvrv4dch4i07lsis76p7g16a039fwx8rk7w8q9f60wgqb5i8"))))
7610c3ca
KK
356 (build-system python-build-system)
357 (native-inputs
44ce3ebb 358 `(("python-attrs" ,python-attrs))) ; for tests
7610c3ca
KK
359 (inputs
360 `(("python-colorama" ,python-colorama)
361 ("python-cssutils" ,python-cssutils)
362 ("python-jinja2" ,python-jinja2)
363 ("python-markupsafe" ,python-markupsafe)
364 ("python-pygments" ,python-pygments)
365 ("python-pypeg2" ,python-pypeg2)
366 ("python-pyyaml" ,python-pyyaml)
44ce3ebb
MR
367 ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
368 ;; that it's __init__.py is used first.
369 ("python-pyqtwebengine" ,python-pyqtwebengine)
7610c3ca 370 ("python-pyqt" ,python-pyqt)
44ce3ebb
MR
371 ;; While qtwebengine is provided by python-pyqtwebengine, it's
372 ;; included here so we can wrap QTWEBENGINEPROCESS_PATH.
373 ("qtwebengine" ,qtwebengine)))
7610c3ca 374 (arguments
44ce3ebb
MR
375 `(;; FIXME: With the existance of qtwebengine, tests can now run. But
376 ;; they are still disabled because test phase hangs. It's not readily
377 ;; apparent as to why.
7e232d02 378 #:tests? #f
7610c3ca
KK
379 #:phases
380 (modify-phases %standard-phases
44ce3ebb
MR
381 (add-before 'check 'set-env-offscreen
382 (lambda _
383 (setenv "QT_QPA_PLATFORM" "offscreen")
384 #t))
7610c3ca
KK
385 (add-after 'install 'install-more
386 (lambda* (#:key outputs #:allow-other-keys)
387 (let* ((out (assoc-ref outputs "out"))
388 (app (string-append out "/share/applications"))
389 (hicolor (string-append out "/share/icons/hicolor")))
7610c3ca
KK
390 (install-file "doc/qutebrowser.1"
391 (string-append out "/share/man/man1"))
7610c3ca
KK
392 (for-each
393 (lambda (i)
394 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
395 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
396 hicolor i i)))
397 (mkdir-p (dirname dest))
398 (copy-file src dest)))
399 '(16 24 32 48 64 128 256 512))
400 (install-file "icons/qutebrowser.svg"
401 (string-append hicolor "/scalable/apps"))
d7c58c3e 402 (substitute* "misc/org.qutebrowser.qutebrowser.desktop"
7610c3ca
KK
403 (("Exec=qutebrowser")
404 (string-append "Exec=" out "/bin/qutebrowser")))
d7c58c3e 405 (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
44ce3ebb
MR
406 #t)))
407 (add-after 'wrap 'wrap-qt-process-path
408 (lambda* (#:key inputs outputs #:allow-other-keys)
409 (let* ((out (assoc-ref outputs "out"))
410 (bin (string-append out "/bin/qutebrowser"))
411 (qt-process-path (string-append
412 (assoc-ref inputs "qtwebengine")
413 "/lib/qt5/libexec/QtWebEngineProcess")))
414 (wrap-program bin
415 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
7610c3ca
KK
416 #t))))))
417 (home-page "https://qutebrowser.org/")
418 (synopsis "Minimal, keyboard-focused, vim-like web browser")
419 (description "qutebrowser is a keyboard-focused browser with a minimal
44ce3ebb 420GUI. It is based on PyQt5 and QtWebEngine.")
7610c3ca 421 (license license:gpl3+)))
f0c817a7
TE
422
423(define-public vimb
424 (package
425 (name "vimb")
0ed75a5f 426 (version "3.6.0")
f0c817a7
TE
427 (source
428 (origin
429 (method git-fetch)
430 (uri (git-reference
431 (url "https://github.com/fanglingsu/vimb/")
432 (commit version)))
433 (sha256
0ed75a5f 434 (base32 "0228khh3lqbal046k6akqah7s5igq9s0wjfjbdjam75kjj42pbhj"))
f0c817a7
TE
435 (file-name (git-file-name name version))))
436 (build-system glib-or-gtk-build-system)
437 (arguments
f51905a4 438 '(#:tests? #f ; no tests
f0c817a7
TE
439 #:make-flags (list "CC=gcc"
440 "DESTDIR="
441 (string-append "PREFIX=" %output))
442 #:phases
443 (modify-phases %standard-phases
444 (delete 'configure))))
445 (inputs
446 `(("glib-networking" ,glib-networking)
447 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
448 ("webkitgtk" ,webkitgtk)))
449 (native-inputs
450 `(("pkg-config" ,pkg-config)))
451 (home-page "https://fanglingsu.github.io/vimb/")
452 (synopsis "Fast and lightweight Vim-like web browser")
453 (description "Vimb is a fast and lightweight vim like web browser based on
454the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
455vim editor and also easily configurable during runtime. Vimb is mostly keyboard
456driven and does not detract you from your daily work.")
457 (license license:gpl3+)))
18974c1e 458
ec70df72
PN
459(define-public nyxt
460 ;; 1.5.0 does not build anymore, let's use the master which is more stable anyways.
461 (let ((commit "9440980a9c5f75232b08ca98183b22be4a3d9bc3"))
462 (package
463 (name "nyxt")
464 (version (git-version "1.5.0" "1" commit))
465 (source
466 (origin
467 (method git-fetch)
468 (uri (git-reference
469 ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
470 ;; (url "https://source.atlas.engineer/public/nyxt")
471 (url "https://github.com/atlas-engineer/nyxt")
472 (commit commit)))
473 (sha256
474 (base32
475 "079n5ffsa8136i9ik5mn4rwa3iv0avncw6y973gj3hlf8sf4wv7g"))
476 (file-name (git-file-name "nyxt" version))))
477 (build-system gnu-build-system)
478 (arguments
479 `(#:make-flags (list "nyxt" "NYXT_INTERNAL_QUICKLISP=false"
480 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
481 "PREFIX=")
482 #:strip-binaries? #f ; Stripping breaks SBCL binaries.
483 #:phases
484 (modify-phases %standard-phases
485 (add-after 'unpack 'patch-version ; Version is guessed from .git which Guix does not have.
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((version (format #f "~a" ,version)))
488 (substitute* "source/global.lisp"
489 (("version\\)\\)\\)")
490 (string-append "version)))"
491 "\n"
492 "(setf +version+ \"" version "\")"))))
493 #t))
494 (add-before 'build 'make-desktop-version-number
495 (lambda _
496 (with-output-to-file "version"
497 (lambda _
498 (format #t "~a" ,version)))))
499
500 (delete 'configure)
501 (add-before 'build 'fix-common-lisp-cache-folder
502 (lambda _
503 (setenv "HOME" "/tmp")
504 #t))
505 (add-after 'install 'wrap-program
506 (lambda* (#:key inputs outputs #:allow-other-keys)
507 (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
508 (glib-networking (assoc-ref inputs "glib-networking"))
509 (libs '("gsettings-desktop-schemas"))
510 (path (string-join
511 (map (lambda (lib)
512 (string-append (assoc-ref inputs lib) "/lib"))
513 libs)
514 ":"))
515 (gi-path (string-join
516 (map (lambda (lib)
517 (string-append (assoc-ref inputs lib) "/lib/girepository-1.0"))
518 libs)
519 ":"))
520 (xdg-path (string-join
521 (map (lambda (lib)
522 (string-append (assoc-ref inputs lib) "/share"))
523 libs)
524 ":")))
525 (wrap-program bin
526 `("GIO_EXTRA_MODULES" prefix
527 (,(string-append glib-networking "/lib/gio/modules")))
528 `("GI_TYPELIB_PATH" prefix (,gi-path))
529 `("LD_LIBRARY_PATH" ":" prefix (,path))
530 `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))
531 #t))))))
532 (native-inputs
533 `(("prove" ,sbcl-prove)
534 ("sbcl" ,sbcl)))
535 (inputs
536 ;; We need to avoid sbcl-* inputs (sbcl-cl-cffi-gtk in particular) as they
537 ;; seem to cause Nyxt to hang into a hogging process in about 10 minutes.
538 ;; Probably an issue between CFFI and how we build SBCL packages.
539 ;; See https://github.com/atlas-engineer/nyxt/issues/680.
540 `(("alexandria" ,cl-alexandria)
541 ("bordeaux-threads" ,cl-bordeaux-threads)
542 ("cl-containers" ,cl-containers)
543 ("cl-css" ,cl-css)
544 ("cl-json" ,cl-json)
545 ("cl-markup" ,cl-markup)
546 ("cl-ppcre" ,cl-ppcre)
547 ("cl-prevalence" ,cl-prevalence)
548 ("closer-mop" ,cl-closer-mop)
549 ("cluffer" ,cl-cluffer)
550 ("dexador" ,cl-dexador)
551 ("enchant" ,cl-enchant)
552 ("fset" ,cl-fset)
553 ("iolib" ,cl-iolib)
554 ("local-time" ,cl-local-time)
555 ("log4cl" ,cl-log4cl)
556 ("lparallel" ,cl-lparallel)
557 ("mk-string-metrics" ,cl-mk-string-metrics)
558 ("moptilities" ,cl-moptilities)
559 ("osicat" ,sbcl-osicat) ; SBCL version needed for libosicat.so.
560 ("parenscript" ,cl-parenscript)
561 ("plump" ,cl-plump)
562 ("quri" ,cl-quri)
563 ("serapeum" ,cl-serapeum)
564 ("str" ,cl-str)
565 ("swank" ,cl-slime-swank)
566 ("trivia" ,cl-trivia)
567 ("trivial-clipboard" ,cl-trivial-clipboard)
568 ("trivial-features" ,cl-trivial-features)
569 ("trivial-package-local-nicknames" ,cl-trivial-package-local-nicknames)
570 ("trivial-types" ,cl-trivial-types)
571 ("unix-opts" ,cl-unix-opts)
572 ;; WebKitGTK deps
573 ("cl-cffi-gtk" ,cl-cffi-gtk)
574 ("cl-webkit" ,cl-webkit)
575 ("glib-networking" ,glib-networking)
576 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
577 (synopsis "Extensible web-browser in Common Lisp")
578 (home-page "https://nyxt.atlas.engineer")
579 (description "Nyxt is a keyboard-oriented, extensible web-browser
676e21e4
PN
580designed for power users. The application has familiar Emacs and VI
581key-bindings and is fully configurable and extensible in Common Lisp.")
ec70df72 582 (license license:bsd-3))))
90a31c73 583
01bb2e30 584(define-public next
ec70df72 585 (deprecated-package "next" nyxt))
01bb2e30
PN
586
587(define-public sbcl-next
ec70df72 588 (deprecated-package "sbcl-next" nyxt))
5b4db516
W
589
590(define-public bombadillo
591 (package
592 (name "bombadillo")
593 (version "2.2.0")
594 (source (origin
595 (method git-fetch)
596 (uri (git-reference
597 (url "https://tildegit.org/sloum/bombadillo")
598 (commit version)))
599 (sha256
600 (base32
601 "1m52b1wk48gkqmjy8l0x3jaksrx2v8w6w59lhr7zaw2i0n4f5k0z"))
602 (file-name (git-file-name name version))))
603 (build-system go-build-system)
604 (arguments
605 `(#:import-path "tildegit.org/sloum/bombadillo"
606 #:install-source? #f
607 #:phases (modify-phases %standard-phases
608 (add-after 'install 'install-data
609 (lambda* (#:key outputs #:allow-other-keys)
610 (let* ((builddir "src/tildegit.org/sloum/bombadillo")
611 (out (assoc-ref outputs "out"))
612 (pkg (strip-store-file-name out))
613 (sharedir (string-append out "/share"))
614 (appdir (string-append sharedir "/applications"))
615 (docdir (string-append sharedir "/doc/" pkg))
616 (mandir (string-append sharedir "/man/man1"))
617 (pixdir (string-append sharedir "/pixmaps")))
618 (with-directory-excursion builddir
619 (install-file "bombadillo.desktop" appdir)
620 (install-file "LICENSE" docdir)
621 (install-file "bombadillo.1" mandir)
622 (install-file "bombadillo-icon.png" pixdir)
623 #t)))))))
70e1199c 624 (home-page "https://bombadillo.colorfield.space")
5b4db516
W
625 (synopsis "Terminal browser for the gopher, gemini, and finger protocols")
626 (description "Bombadillo is a non-web browser for the terminal with
627vim-like key bindings, a document pager, configurable settings, and robust
628command selection. The following protocols are supported as first-class
629citizens: gopher, gemini, finger, and local. There is also support for telnet,
630http, and https via third-party applications.")
631 (license license:gpl3+)))