Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org> | |
c44899a2 | 3 | ;;; |
233e7676 | 4 | ;;; This file is part of GNU Guix. |
c44899a2 | 5 | ;;; |
233e7676 | 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
233e7676 | 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 LC |
18 | |
19 | (define-module (distro packages readline) | |
4a44e743 | 20 | #:use-module (guix licenses) |
c44899a2 LC |
21 | #:use-module (distro) |
22 | #:use-module (distro packages ncurses) | |
23 | #:use-module (guix packages) | |
87f5d366 | 24 | #:use-module (guix download) |
c44899a2 LC |
25 | #:use-module (guix utils) |
26 | #:use-module (guix build-system gnu)) | |
27 | ||
28 | (define-public readline | |
29 | (package | |
30 | (name "readline") | |
31 | (version "6.2") | |
32 | (source (origin | |
87f5d366 | 33 | (method url-fetch) |
0db342a5 | 34 | (uri (string-append "mirror://gnu/readline/readline-" |
c44899a2 LC |
35 | version ".tar.gz")) |
36 | (sha256 | |
37 | (base32 | |
38 | "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr")))) | |
39 | (build-system gnu-build-system) | |
40 | (propagated-inputs `(("ncurses" ,ncurses))) | |
41 | (inputs `(("patch/link-ncurses" | |
42 | ,(search-patch "readline-link-ncurses.patch")))) | |
43 | (arguments `(#:patches (list (assoc-ref %build-inputs | |
44 | "patch/link-ncurses")) | |
45 | #:patch-flags '("-p0") | |
46 | #:configure-flags | |
47 | (list (string-append "LDFLAGS=-Wl,-rpath -Wl," | |
48 | (assoc-ref %build-inputs "ncurses") | |
4500581a LC |
49 | "/lib")) |
50 | ||
51 | #:phases (alist-cons-after | |
52 | 'install 'post-install | |
53 | (lambda* (#:key outputs #:allow-other-keys) | |
54 | (let* ((out (assoc-ref outputs "out")) | |
55 | (lib (string-append out "/lib"))) | |
56 | ;; Make libraries writable so that `strip' can | |
57 | ;; work. Failing to do that, it bails out with | |
58 | ;; "Permission denied". | |
59 | (for-each (lambda (f) (chmod f #o755)) | |
60 | (find-files lib "\\.so")) | |
61 | (for-each (lambda (f) (chmod f #o644)) | |
62 | (find-files lib "\\.a")))) | |
63 | %standard-phases))) | |
c44899a2 LC |
64 | (synopsis "GNU Readline, a library for interactive line editing") |
65 | (description | |
66 | "The GNU Readline library provides a set of functions for use by | |
67 | applications that allow users to edit command lines as they are typed in. | |
68 | Both Emacs and vi editing modes are available. The Readline library includes | |
69 | additional functions to maintain a list of previously-entered command lines, | |
70 | to recall and perhaps reedit those lines, and perform csh-like history | |
71 | expansion on previous commands. | |
72 | ||
73 | The history facilites are also placed into a separate library, the History | |
74 | library, as part of the build process. The History library may be used | |
75 | without Readline in applications which desire its capabilities.") | |
4a44e743 | 76 | (license gpl3+) |
c44899a2 | 77 | (home-page "http://savannah.gnu.org/projects/readline/"))) |