gnu: Move sqlite to separate module.
[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>
c5196ac7 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
8bdc36d4 4;;; Copyright © 2015, 2016 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>
b8b34be6 7;;; Copyright © 2018 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>
c21a2562
KY
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
0c3953ea 27(define-module (gnu packages web-browsers)
c21a2562
KY
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages compression)
7610c3ca 32 #:use-module (gnu packages documentation)
c21a2562
KY
33 #:use-module (gnu packages fltk)
34 #:use-module (gnu packages fontutils)
700987f7 35 #:use-module (gnu packages gtk)
c5196ac7 36 #:use-module (gnu packages gnupg)
8bdc36d4 37 #:use-module (gnu packages libevent)
c5196ac7 38 #:use-module (gnu packages libidn)
acad932e 39 #:use-module (gnu packages lisp)
700987f7 40 #:use-module (gnu packages lua)
41 #:use-module (gnu packages gnome)
c5196ac7 42 #:use-module (gnu packages ncurses)
c21a2562
KY
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
7610c3ca 45 #:use-module (gnu packages python)
1b2f753d 46 #:use-module (gnu packages python-web)
44d10b1f 47 #:use-module (gnu packages python-xyz)
7610c3ca 48 #:use-module (gnu packages qt)
c21a2562 49 #:use-module (gnu packages image)
cd0322a3 50 #:use-module (gnu packages sqlite)
c21a2562 51 #:use-module (gnu packages tls)
700987f7 52 #:use-module (gnu packages webkit)
c21a2562 53 #:use-module (gnu packages xorg)
194d1ec3 54 #:use-module (gnu packages gcc)
c21a2562 55 #:use-module (guix download)
f0c817a7 56 #:use-module (guix git-download)
7610c3ca 57 #:use-module (guix build-system gnu)
700987f7 58 #:use-module (guix build-system glib-or-gtk)
acad932e
PN
59 #:use-module (guix build-system python)
60 #:use-module (guix build-system asdf))
c21a2562
KY
61
62(define-public dillo
63 (package
64 (name "dillo")
65 (version "3.0.5")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append "http://www.dillo.org/download/"
69 name "-" version ".tar.bz2"))
70 (sha256
71 (base32
72 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
73 (build-system gnu-build-system)
74 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
75 (native-inputs `(("pkg-config" ,pkg-config)))
76 (inputs `(("fltk" ,fltk)
77 ("fontconfig" ,fontconfig)
78 ("libjpeg" ,libjpeg)
79 ("libpng" ,libpng)
80 ("libxcursor" ,libxcursor)
81 ("libxft" ,libxft)
82 ("libxi" ,libxi)
83 ("libxinerama" ,libxinerama)
84 ("openssl" ,openssl)
85 ("perl" ,perl)
86 ("zlib" ,zlib)))
87 (synopsis "Very small and fast graphical web browser")
88 (description "Dillo is a minimalistic web browser particularly intended for
89older or slower computers and embedded systems.")
90 (home-page "http://www.dillo.org")
91 (license license:gpl3+)))
7610c3ca 92
8bdc36d4
KK
93(define-public links
94 (package
95 (name "links")
a0fad037 96 (version "2.17")
8bdc36d4
KK
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "http://links.twibright.com/download/"
100 name "-" version ".tar.bz2"))
929e2d9f 101 (sha256
8bdc36d4 102 (base32
a0fad037 103 "0dh2gbzcw8kxy81z4ggsynibnqs56b83vy8qgz7illsag1irff6q"))))
8bdc36d4
KK
104 (build-system gnu-build-system)
105 (arguments
106 `(#:phases
107 (modify-phases %standard-phases
108 (replace 'configure
109 (lambda* (#:key outputs #:allow-other-keys)
110 ;; The tarball uses a very old version of autconf. It doesn't
111 ;; understand extra flags like `--enable-fast-install', so
112 ;; we need to invoke it with just what it understands.
113 (let ((out (assoc-ref outputs "out")))
114 ;; 'configure' doesn't understand '--host'.
115 ,@(if (%current-target-system)
116 `((setenv "CHOST" ,(%current-target-system)))
117 '())
118 (setenv "CONFIG_SHELL" (which "bash"))
b8b34be6
TGR
119 (invoke "./configure"
120 (string-append "--prefix=" out)
121 "--enable-graphics")
122 #t))))))
8bdc36d4
KK
123 (native-inputs `(("pkg-config" ,pkg-config)))
124 (inputs `(("zlib" ,zlib)
125 ("openssl" ,openssl)
126 ("libjpeg" ,libjpeg)
127 ("libtiff" ,libtiff)
128 ("libevent" ,libevent)
129 ("libpng" ,libpng)
130 ("libxt" ,libxt)))
131 (synopsis "Text and graphics mode web browser")
132 (description "Links is a graphics and text mode web browser, with many
133features including, tables, builtin image display, bookmarks, SSL and more.")
134 (home-page "http://links.twibright.com")
135 ;; The distribution contains a copy of GPLv2
136 ;; However, the copyright notices simply say:
137 ;; "This file is a part of the Links program, released under GPL."
138 ;; Therefore, under the provisions of Section 9, we can choose
139 ;; any version ever published by the FSF.
140 ;; One file (https.c) contains an exception permitting
141 ;; linking of the program with openssl.
142 (license license:gpl1+)))
143
700987f7 144(define-public luakit
145 (package
146 (name "luakit")
147 (version "2017.08.10")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append "https://github.com/luakit/luakit/archive/" version
151 ".tar.gz"))
152 (sha256
153 (base32
154 "0dwxhnq90whakgdg21lzcf03n2g1c7hqgliwhav8av5na5mqpn93"))
155 (file-name (string-append name "-" version ".tar.gz"))))
156 (inputs
b42b5afd 157 `(("lua-5.1" ,lua-5.1)
700987f7 158 ("gtk+" ,gtk+)
b42b5afd
MW
159 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
160 ("glib-networking" ,glib-networking)
161 ("lua5.1-filesystem" ,lua5.1-filesystem)
162 ("luajit" ,luajit)
163 ("webkitgtk" ,webkitgtk)
164 ("sqlite" ,sqlite)))
700987f7 165 (native-inputs
b42b5afd 166 `(("pkg-config" ,pkg-config)))
700987f7 167 (build-system glib-or-gtk-build-system)
168 (arguments
169 '(#:make-flags
170 (let ((out (assoc-ref %outputs "out")))
171 (list
172 "CC=gcc"
173 "LUA_BIN_NAME=lua"
174 "DEVELOPMENT_PATHS=0"
175 (string-append "PREFIX=" out)
176 (string-append "XDGPREFIX=" out "/etc/xdg")))
177 #:phases
178 (modify-phases %standard-phases
179 (add-before 'build 'lfs-workaround
180 (lambda _
181 (setenv "LUA_CPATH"
182 (string-append
183 (assoc-ref %build-inputs "lua5.1-filesystem")
184 "/lib/lua/5.1/?.so;;"))
185 #t))
186 (delete 'configure)
187 (delete 'check)
188 (add-after 'install 'wrap
189 (lambda* (#:key inputs outputs #:allow-other-keys)
190 (let* ((luakit (assoc-ref outputs "out"))
191 (lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
192 (gtk (assoc-ref inputs "gtk+"))
193 (gtk-share (string-append gtk "/share")))
194 (wrap-program (string-append luakit "/bin/luakit")
195 `("LUA_CPATH" prefix
196 (,(string-append lua5.1-filesystem
f9984535
RM
197 "/lib/lua/5.1/?.so;;")))
198 `("XDG_CONFIG_DIRS" prefix
199 (,(string-append luakit "/etc/xdg/"))))
700987f7 200 #t))))))
201 (synopsis "Fast, lightweight, and simple browser based on WebKit")
202 (description "Luakit is a fast, lightweight, and simple to use
203micro-browser framework extensible by Lua using the WebKit web content engine
204and the GTK+ toolkit.")
205 (home-page "https://luakit.github.io/")
206 (license license:gpl3+)))
207
c5196ac7
KK
208(define-public lynx
209 (package
210 (name "lynx")
781e5158 211 (version "2.8.9rel.1")
c5196ac7
KK
212 (source (origin
213 (method url-fetch)
214 (uri (string-append
215 "http://invisible-mirror.net/archives/lynx/tarballs"
216 "/lynx" version ".tar.bz2"))
217 (sha256
218 (base32
781e5158 219 "15cmyyma2kz1hfaa6mwjgli8zwdzq3jv0q2cl6nwzycjfwyijzrq"))))
c5196ac7
KK
220 (build-system gnu-build-system)
221 (native-inputs `(("pkg-config" ,pkg-config)
222 ("perl" ,perl)))
223 (inputs `(("ncurses" ,ncurses)
224 ("libidn" ,libidn)
225 ("gnutls" ,gnutls)
226 ("libgcrypt" ,libgcrypt)
227 ("unzip" ,unzip)
228 ("zlib" ,zlib)
229 ("gzip" ,gzip)
230 ("bzip2" ,bzip2)))
231 (arguments
232 `(#:configure-flags
233 (let ((gnutls (assoc-ref %build-inputs "gnutls")))
234 `("--with-pkg-config"
235 "--with-screen=ncurses"
236 "--with-zlib"
237 "--with-bzlib"
238 ,(string-append "--with-gnutls=" gnutls)
239 ;; "--with-socks5" ; XXX TODO
240 "--enable-widec"
241 "--enable-ascii-ctypes"
242 "--enable-local-docs"
243 "--enable-htmlized-cfg"
244 "--enable-gzip-help"
245 "--enable-nls"
246 "--enable-ipv6"))
247 #:tests? #f ; no check target
dc1d3cde
KK
248 #:phases
249 (modify-phases %standard-phases
e3cea0d5
LF
250 (add-before 'configure 'set-makefile-shell
251 (lambda _ (substitute* "po/makefile.inn"
252 (("/bin/sh") (which "sh")))
253 #t))
dc1d3cde
KK
254 (replace 'install
255 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b8b34be6
TGR
256 (apply invoke "make" "install-full" make-flags)
257 #t)))))
c5196ac7
KK
258 (synopsis "Text Web Browser")
259 (description
260 "Lynx is a fully-featured World Wide Web (WWW) client for users running
261cursor-addressable, character-cell display devices. It will display Hypertext
262Markup Language (HTML) documents containing links to files on the local
263system, as well as files on remote systems running http, gopher, ftp, wais,
264nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
265the WWW, or to build information systems intended primarily for local
266access.")
9c2917f9 267 (home-page "https://lynx.invisible-island.net/")
c5196ac7
KK
268 (license license:gpl2)))
269
7610c3ca
KK
270(define-public qutebrowser
271 (package
272 (name "qutebrowser")
d209ce43 273 (version "0.11.0")
7610c3ca
KK
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append "https://github.com/The-Compiler/"
278 "qutebrowser/releases/download/v" version "/"
279 "qutebrowser-" version ".tar.gz"))
280 (sha256
281 (base32
d209ce43 282 "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv"))))
7610c3ca
KK
283 (build-system python-build-system)
284 (native-inputs
285 `(("asciidoc" ,asciidoc)))
286 (inputs
287 `(("python-colorama" ,python-colorama)
288 ("python-cssutils" ,python-cssutils)
289 ("python-jinja2" ,python-jinja2)
290 ("python-markupsafe" ,python-markupsafe)
291 ("python-pygments" ,python-pygments)
292 ("python-pypeg2" ,python-pypeg2)
293 ("python-pyyaml" ,python-pyyaml)
294 ("python-pyqt" ,python-pyqt)
295 ("qtwebkit" ,qtwebkit)))
296 (arguments
297 `(#:tests? #f ;no tests
298 #:phases
299 (modify-phases %standard-phases
300 (add-after 'install 'install-more
301 (lambda* (#:key outputs #:allow-other-keys)
302 (let* ((out (assoc-ref outputs "out"))
303 (app (string-append out "/share/applications"))
304 (hicolor (string-append out "/share/icons/hicolor")))
b8b34be6 305 (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
7610c3ca
KK
306 (install-file "doc/qutebrowser.1"
307 (string-append out "/share/man/man1"))
308
309 (for-each
310 (lambda (i)
311 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
312 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
313 hicolor i i)))
314 (mkdir-p (dirname dest))
315 (copy-file src dest)))
316 '(16 24 32 48 64 128 256 512))
317 (install-file "icons/qutebrowser.svg"
318 (string-append hicolor "/scalable/apps"))
319
320 (substitute* "qutebrowser.desktop"
321 (("Exec=qutebrowser")
322 (string-append "Exec=" out "/bin/qutebrowser")))
323 (install-file "qutebrowser.desktop" app)
324 #t))))))
325 (home-page "https://qutebrowser.org/")
326 (synopsis "Minimal, keyboard-focused, vim-like web browser")
327 (description "qutebrowser is a keyboard-focused browser with a minimal
328GUI. It is based on PyQt5 and QtWebKit.")
329 (license license:gpl3+)))
f0c817a7
TE
330
331(define-public vimb
332 (package
333 (name "vimb")
334 (version "3.3.0")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "https://github.com/fanglingsu/vimb/")
340 (commit version)))
341 (sha256
342 (base32
343 "1qg18z2gnsli9qgrqfhqfrsi6g9mcgr90w8yab28nxrq4aha6brf"))
344 (file-name (git-file-name name version))))
345 (build-system glib-or-gtk-build-system)
346 (arguments
347 '(#:tests? #f ; no tests
348 #:make-flags (list "CC=gcc"
349 "DESTDIR="
350 (string-append "PREFIX=" %output))
351 #:phases
352 (modify-phases %standard-phases
353 (delete 'configure))))
354 (inputs
355 `(("glib-networking" ,glib-networking)
356 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
357 ("webkitgtk" ,webkitgtk)))
358 (native-inputs
359 `(("pkg-config" ,pkg-config)))
360 (home-page "https://fanglingsu.github.io/vimb/")
361 (synopsis "Fast and lightweight Vim-like web browser")
362 (description "Vimb is a fast and lightweight vim like web browser based on
363the webkit web browser engine and the GTK toolkit. Vimb is modal like the great
364vim editor and also easily configurable during runtime. Vimb is mostly keyboard
365driven and does not detract you from your daily work.")
366 (license license:gpl3+)))
18974c1e
PN
367
368(define-public next-gtk-webkit
b96bd821
PN
369 (package
370 (name "next-gtk-webkit")
194d1ec3 371 (version "1.2.0")
b96bd821
PN
372 (source
373 (origin
374 (method git-fetch)
375 (uri (git-reference
376 (url "https://source.atlas.engineer/public/next")
377 (commit version)))
378 (sha256
379 (base32
194d1ec3 380 "0a066f56hnb9znbwnv1blm31j0ysv05n4wzlkli0zgw087c9047x"))
b96bd821
PN
381 (file-name (git-file-name "next" version))))
382 (build-system glib-or-gtk-build-system)
383 (arguments
384 `(#:tests? #f ; no tests
385 #:make-flags (list "gtk-webkit"
194d1ec3
PN
386 (string-append
387 "CC="
388 (assoc-ref %build-inputs "gcc-7")
389 "/bin/gcc")
b96bd821
PN
390 (string-append "PREFIX=" %output))
391 #:phases
392 (modify-phases %standard-phases
393 (delete 'configure)
394 (replace 'install
395 (lambda* (#:key (make-flags '()) #:allow-other-keys)
396 (apply invoke "make" "install-gtk-webkit" make-flags))))))
397 (inputs
398 `(("glib-networking" ,glib-networking)
399 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
194d1ec3 400 ("webkitgtk" ,webkitgtk-2.22)))
b96bd821 401 (native-inputs
194d1ec3
PN
402 `(("gcc-7" ,gcc-7) ; needed because webkitgtk-2.22 is compiled with gcc-7
403 ("pkg-config" ,pkg-config)))
b96bd821
PN
404 (home-page "https://next.atlas.engineer")
405 (synopsis "Infinitely extensible web-browser (user interface only)")
406 (description "Next is a keyboard-oriented, extensible web-browser
18974c1e
PN
407inspired by Emacs and designed for power users. The application has familiar
408key-bindings, is fully configurable and extensible in Lisp, and has powerful
409features for productive professionals.")
b96bd821 410 (license license:bsd-3)))
acad932e
PN
411
412(define-public sbcl-next
413 (package
414 (inherit next-gtk-webkit)
415 (name "sbcl-next")
416 (build-system asdf-build-system/sbcl)
417 (outputs '("out" "lib"))
418 (arguments
419 `(#:tests? #f ; no tests
420 #:phases (modify-phases %standard-phases
421 (add-after 'unpack 'patch-platform-port-path
422 (lambda* (#:key inputs #:allow-other-keys)
423 (substitute* "source/ports/gtk-webkit.lisp"
424 (("\"next-gtk-webkit\"")
425 (string-append "\"" (assoc-ref inputs "next-gtk-webkit")
426 "/bin/next-gtk-webkit\"")))))
427 (add-before 'cleanup 'move-bundle
428 (lambda* (#:key outputs #:allow-other-keys)
429 (define lib (assoc-ref outputs "lib"))
430 (define actual-fasl (string-append
431 lib
432 "/lib/sbcl/next.fasl"))
433 (define expected-fasl (string-append
434 lib
435 "/lib/sbcl/next--system.fasl"))
acad932e
PN
436 (copy-file actual-fasl expected-fasl)
437 #t))
438 (add-after 'create-symlinks 'build-program
439 (lambda* (#:key outputs #:allow-other-keys)
440 (build-program
441 (string-append (assoc-ref outputs "out") "/bin/next")
442 outputs
443 #:entry-program '((next:start-with-port) 0))))
444 (add-before 'build 'install-assets
445 ;; Since the ASDF build system generates a new .asd with a
446 ;; possibly suffixed and thus illegal version number, assets
447 ;; should not be installed after the 'build phase or else
448 ;; the illegal version will result in NIL in the .desktop
449 ;; file.
450 (lambda* (#:key outputs #:allow-other-keys)
89ca445c
PN
451 (with-output-to-file "version"
452 (lambda _
453 (format #t "~a" ,(package-version next-gtk-webkit))))
acad932e
PN
454 (invoke "make" "install-assets"
455 (string-append "PREFIX="
456 (assoc-ref outputs "out"))))))))
457 (inputs
458 `(("next-gtk-webkit" ,next-gtk-webkit)
459 ;; Lisp libraries:
460 ("trivial-features" ,sbcl-trivial-features)
461 ("alexandria" ,sbcl-alexandria)
462 ("cl-strings" ,sbcl-cl-strings)
463 ("cl-string-match" ,sbcl-cl-string-match)
464 ("puri" ,sbcl-puri)
acad932e
PN
465 ("sqlite" ,sbcl-cl-sqlite)
466 ("parenscript" ,sbcl-parenscript)
467 ("cl-json" ,sbcl-cl-json)
468 ("swank" ,sbcl-slime-swank)
469 ("cl-markup" ,sbcl-cl-markup)
470 ("cl-css" ,sbcl-cl-css)
acad932e
PN
471 ("bordeaux-threads" ,sbcl-bordeaux-threads)
472 ("s-xml-rpc" ,sbcl-s-xml-rpc)
fc1f3f25
PN
473 ("unix-opts" ,sbcl-unix-opts)
474 ("trivial-clipboard" ,sbcl-trivial-clipboard)))
acad932e 475 (synopsis "Infinitely extensible web-browser (with Lisp development files)")))