You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
3.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  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. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  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
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages readline)
  19. #:use-module (guix licenses)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages ncurses)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu))
  25. (define-public readline
  26. (let ((post-install-phase
  27. '(lambda* (#:key outputs #:allow-other-keys)
  28. (let* ((out (assoc-ref outputs "out"))
  29. (lib (string-append out "/lib")))
  30. ;; Make libraries writable so that `strip' can work.
  31. ;; Failing to do that, it bails out with "Permission
  32. ;; denied".
  33. (for-each (lambda (f) (chmod f #o755))
  34. (find-files lib "\\.so"))
  35. (for-each (lambda (f) (chmod f #o644))
  36. (find-files lib "\\.a"))))))
  37. (package
  38. (name "readline")
  39. (version "6.2")
  40. (source (origin
  41. (method url-fetch)
  42. (uri (string-append "mirror://gnu/readline/readline-"
  43. version ".tar.gz"))
  44. (sha256
  45. (base32
  46. "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"))
  47. (patches (list (search-patch "readline-link-ncurses.patch")))
  48. (patch-flags '("-p0"))))
  49. (build-system gnu-build-system)
  50. (propagated-inputs `(("ncurses" ,ncurses)))
  51. (arguments `(#:configure-flags
  52. (list (string-append "LDFLAGS=-Wl,-rpath -Wl,"
  53. (assoc-ref %build-inputs "ncurses")
  54. "/lib"))
  55. #:phases (alist-cons-after
  56. 'install 'post-install
  57. ,post-install-phase
  58. %standard-phases)))
  59. (synopsis "Edit command lines while typing, with history support")
  60. (description
  61. "Readline is a libary that allows users to edit command lines as they
  62. are typed in. It can maintain a searchable history of previously entered
  63. commands, letting you easily recall, edit and re-enter past commands. It
  64. features both Emacs-like and vi-like keybindings, making its usage
  65. comfortable for anyone.")
  66. (license gpl3+)
  67. (home-page "http://savannah.gnu.org/projects/readline/"))))