gnu: twinkle: Add missing headers
[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>
c21a2562
KY
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
0c3953ea 25(define-module (gnu packages web-browsers)
c21a2562
KY
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages compression)
7610c3ca 30 #:use-module (gnu packages documentation)
c21a2562
KY
31 #:use-module (gnu packages fltk)
32 #:use-module (gnu packages fontutils)
c5196ac7 33 #:use-module (gnu packages gnupg)
8bdc36d4 34 #:use-module (gnu packages libevent)
c5196ac7
KK
35 #:use-module (gnu packages libidn)
36 #:use-module (gnu packages ncurses)
c21a2562
KY
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
7610c3ca 39 #:use-module (gnu packages python)
1b2f753d 40 #:use-module (gnu packages python-web)
7610c3ca 41 #:use-module (gnu packages qt)
c21a2562
KY
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages tls)
44 #:use-module (gnu packages xorg)
45 #:use-module (guix download)
7610c3ca
KK
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system python))
c21a2562
KY
48
49(define-public dillo
50 (package
51 (name "dillo")
52 (version "3.0.5")
53 (source (origin
54 (method url-fetch)
55 (uri (string-append "http://www.dillo.org/download/"
56 name "-" version ".tar.bz2"))
57 (sha256
58 (base32
59 "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"))))
60 (build-system gnu-build-system)
61 (arguments `(#:configure-flags '("--enable-ssl" "--enable-ipv6")))
62 (native-inputs `(("pkg-config" ,pkg-config)))
63 (inputs `(("fltk" ,fltk)
64 ("fontconfig" ,fontconfig)
65 ("libjpeg" ,libjpeg)
66 ("libpng" ,libpng)
67 ("libxcursor" ,libxcursor)
68 ("libxft" ,libxft)
69 ("libxi" ,libxi)
70 ("libxinerama" ,libxinerama)
71 ("openssl" ,openssl)
72 ("perl" ,perl)
73 ("zlib" ,zlib)))
74 (synopsis "Very small and fast graphical web browser")
75 (description "Dillo is a minimalistic web browser particularly intended for
76older or slower computers and embedded systems.")
77 (home-page "http://www.dillo.org")
78 (license license:gpl3+)))
7610c3ca 79
8bdc36d4
KK
80(define-public links
81 (package
82 (name "links")
5abd3909 83 (version "2.16")
8bdc36d4
KK
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "http://links.twibright.com/download/"
87 name "-" version ".tar.bz2"))
929e2d9f 88 (sha256
8bdc36d4 89 (base32
5abd3909 90 "0gsa2gpb1grhssl5jzpc5pa0zi21mxi8g25rh5bacl70slw31w42"))))
8bdc36d4
KK
91 (build-system gnu-build-system)
92 (arguments
93 `(#:phases
94 (modify-phases %standard-phases
95 (replace 'configure
96 (lambda* (#:key outputs #:allow-other-keys)
97 ;; The tarball uses a very old version of autconf. It doesn't
98 ;; understand extra flags like `--enable-fast-install', so
99 ;; we need to invoke it with just what it understands.
100 (let ((out (assoc-ref outputs "out")))
101 ;; 'configure' doesn't understand '--host'.
102 ,@(if (%current-target-system)
103 `((setenv "CHOST" ,(%current-target-system)))
104 '())
105 (setenv "CONFIG_SHELL" (which "bash"))
b8b34be6
TGR
106 (invoke "./configure"
107 (string-append "--prefix=" out)
108 "--enable-graphics")
109 #t))))))
8bdc36d4
KK
110 (native-inputs `(("pkg-config" ,pkg-config)))
111 (inputs `(("zlib" ,zlib)
112 ("openssl" ,openssl)
113 ("libjpeg" ,libjpeg)
114 ("libtiff" ,libtiff)
115 ("libevent" ,libevent)
116 ("libpng" ,libpng)
117 ("libxt" ,libxt)))
118 (synopsis "Text and graphics mode web browser")
119 (description "Links is a graphics and text mode web browser, with many
120features including, tables, builtin image display, bookmarks, SSL and more.")
121 (home-page "http://links.twibright.com")
122 ;; The distribution contains a copy of GPLv2
123 ;; However, the copyright notices simply say:
124 ;; "This file is a part of the Links program, released under GPL."
125 ;; Therefore, under the provisions of Section 9, we can choose
126 ;; any version ever published by the FSF.
127 ;; One file (https.c) contains an exception permitting
128 ;; linking of the program with openssl.
129 (license license:gpl1+)))
130
c5196ac7
KK
131(define-public lynx
132 (package
133 (name "lynx")
c648781c 134 (version "2.8.9dev.19")
c5196ac7
KK
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
138 "http://invisible-mirror.net/archives/lynx/tarballs"
139 "/lynx" version ".tar.bz2"))
140 (sha256
141 (base32
c648781c 142 "17wfiad2ha4y15pmwv55j0l9z1z1pcgcasrc6hwbgv0hhdpp08q2"))))
c5196ac7
KK
143 (build-system gnu-build-system)
144 (native-inputs `(("pkg-config" ,pkg-config)
145 ("perl" ,perl)))
146 (inputs `(("ncurses" ,ncurses)
147 ("libidn" ,libidn)
148 ("gnutls" ,gnutls)
149 ("libgcrypt" ,libgcrypt)
150 ("unzip" ,unzip)
151 ("zlib" ,zlib)
152 ("gzip" ,gzip)
153 ("bzip2" ,bzip2)))
154 (arguments
155 `(#:configure-flags
156 (let ((gnutls (assoc-ref %build-inputs "gnutls")))
157 `("--with-pkg-config"
158 "--with-screen=ncurses"
159 "--with-zlib"
160 "--with-bzlib"
161 ,(string-append "--with-gnutls=" gnutls)
162 ;; "--with-socks5" ; XXX TODO
163 "--enable-widec"
164 "--enable-ascii-ctypes"
165 "--enable-local-docs"
166 "--enable-htmlized-cfg"
167 "--enable-gzip-help"
168 "--enable-nls"
169 "--enable-ipv6"))
170 #:tests? #f ; no check target
dc1d3cde
KK
171 #:phases
172 (modify-phases %standard-phases
e3cea0d5
LF
173 (add-before 'configure 'set-makefile-shell
174 (lambda _ (substitute* "po/makefile.inn"
175 (("/bin/sh") (which "sh")))
176 #t))
dc1d3cde
KK
177 (replace 'install
178 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b8b34be6
TGR
179 (apply invoke "make" "install-full" make-flags)
180 #t)))))
c5196ac7
KK
181 (synopsis "Text Web Browser")
182 (description
183 "Lynx is a fully-featured World Wide Web (WWW) client for users running
184cursor-addressable, character-cell display devices. It will display Hypertext
185Markup Language (HTML) documents containing links to files on the local
186system, as well as files on remote systems running http, gopher, ftp, wais,
187nntp, finger, or cso/ph/qi servers. Lynx can be used to access information on
188the WWW, or to build information systems intended primarily for local
189access.")
9c2917f9 190 (home-page "https://lynx.invisible-island.net/")
c5196ac7
KK
191 (license license:gpl2)))
192
7610c3ca
KK
193(define-public qutebrowser
194 (package
195 (name "qutebrowser")
d209ce43 196 (version "0.11.0")
7610c3ca
KK
197 (source
198 (origin
199 (method url-fetch)
200 (uri (string-append "https://github.com/The-Compiler/"
201 "qutebrowser/releases/download/v" version "/"
202 "qutebrowser-" version ".tar.gz"))
203 (sha256
204 (base32
d209ce43 205 "13ihx66jm1dd6vx8px7pm0kbzf2sf9x43hhivc1rp17kahnxxdyv"))))
7610c3ca
KK
206 (build-system python-build-system)
207 (native-inputs
208 `(("asciidoc" ,asciidoc)))
209 (inputs
210 `(("python-colorama" ,python-colorama)
211 ("python-cssutils" ,python-cssutils)
212 ("python-jinja2" ,python-jinja2)
213 ("python-markupsafe" ,python-markupsafe)
214 ("python-pygments" ,python-pygments)
215 ("python-pypeg2" ,python-pypeg2)
216 ("python-pyyaml" ,python-pyyaml)
217 ("python-pyqt" ,python-pyqt)
218 ("qtwebkit" ,qtwebkit)))
219 (arguments
220 `(#:tests? #f ;no tests
221 #:phases
222 (modify-phases %standard-phases
223 (add-after 'install 'install-more
224 (lambda* (#:key outputs #:allow-other-keys)
225 (let* ((out (assoc-ref outputs "out"))
226 (app (string-append out "/share/applications"))
227 (hicolor (string-append out "/share/icons/hicolor")))
b8b34be6 228 (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
7610c3ca
KK
229 (install-file "doc/qutebrowser.1"
230 (string-append out "/share/man/man1"))
231
232 (for-each
233 (lambda (i)
234 (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i))
235 (dest (format #f "~a/~dx~d/apps/qutebrowser.png"
236 hicolor i i)))
237 (mkdir-p (dirname dest))
238 (copy-file src dest)))
239 '(16 24 32 48 64 128 256 512))
240 (install-file "icons/qutebrowser.svg"
241 (string-append hicolor "/scalable/apps"))
242
243 (substitute* "qutebrowser.desktop"
244 (("Exec=qutebrowser")
245 (string-append "Exec=" out "/bin/qutebrowser")))
246 (install-file "qutebrowser.desktop" app)
247 #t))))))
248 (home-page "https://qutebrowser.org/")
249 (synopsis "Minimal, keyboard-focused, vim-like web browser")
250 (description "qutebrowser is a keyboard-focused browser with a minimal
251GUI. It is based on PyQt5 and QtWebKit.")
252 (license license:gpl3+)))