tests: hackage: Fix mock urls.
[jackhill/guix/guix.git] / gnu / packages / links.scm
CommitLineData
c2150d9a 1;;; GNU Guix --- Functional package management for GNU
cb7fed92
EF
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
c2150d9a
JD
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages links)
b5b73a82 21 #:use-module ((guix licenses) #:prefix license:)
c2150d9a
JD
22 #:use-module (guix packages)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages pkg-config)
26 #:use-module (gnu packages image)
a83adbf6 27 #:use-module (gnu packages libevent)
cc2b77df 28 #:use-module (gnu packages tls)
c2150d9a
JD
29 #:use-module (gnu packages xorg)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu))
32
33(define-public links
34 (package
35 (name "links")
cb7fed92 36 (version "2.12")
c2150d9a
JD
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "http://links.twibright.com/download/"
40 name "-" version ".tar.bz2"))
41 (sha256
cb7fed92 42 (base32 "0knq15yrp60s4jh92aacw8yfc2pcv3bqsw7dba7h5s6ivq8ihhcq"))))
c2150d9a
JD
43 (build-system gnu-build-system)
44 (arguments
45 `(#:phases (alist-replace
46 'configure
47 (lambda* (#:key outputs #:allow-other-keys)
cb7fed92
EF
48 ;; The tarball uses a very old version of autconf. It doesn't
49 ;; understand extra flags like `--enable-fast-install', so
50 ;; we need to invoke it with just what it understands.
c2150d9a
JD
51 (let ((out (assoc-ref outputs "out")))
52 ;; 'configure' doesn't understand '--host'.
53 ,@(if (%current-target-system)
54 `((setenv "CHOST" ,(%current-target-system)))
55 '())
56 (setenv "CONFIG_SHELL" (which "bash"))
57 (zero?
58 (system* "./configure"
59 (string-append "--prefix=" out)
cb7fed92 60 "--enable-graphics"))))
c2150d9a
JD
61 %standard-phases)))
62 (native-inputs `(("pkg-config" ,pkg-config)))
63 (inputs `(("zlib" ,zlib)
64 ("openssl" ,openssl)
65 ("libjpeg" ,libjpeg)
66 ("libtiff" ,libtiff)
a83adbf6 67 ("libevent" ,libevent)
c2150d9a
JD
68 ("libpng" ,libpng)
69 ("libxt" ,libxt)))
70 (synopsis "Text and graphics mode web browser")
71 (description "Links is a graphics and text mode web browser, with many
72features including, tables, builtin image display, bookmarks, SSL and more.")
73 (home-page "http://links.twibright.com")
cb7fed92
EF
74 ;; The distribution contains a copy of GPLv2
75 ;; However, the copyright notices simply say:
c2150d9a
JD
76 ;; "This file is a part of the Links program, released under GPL."
77 ;; Therefore, under the provisions of Section 9, we can choose
cb7fed92
EF
78 ;; any version ever published by the FSF.
79 ;; One file (https.c) contains an exception permitting
80 ;; linking of the program with openssl.
81 (license license:gpl1+)))