Browse Source

distro: Add GNU Ncurses.

* distro/base.scm (ncurses): New variable.
  (readline): Use it.
Ludovic Courtès 9 years ago
  1. 81


@ -198,6 +198,85 @@ faster algorithms.")
(license "LGPLv3+")
(home-page "")))
(define-public ncurses
(let ((post-install-phase
'(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; When building a wide-character (Unicode) build, create backward
;; compatibility links from the the "normal" libraries to the
;; wide-character libraries (e.g. to
(with-directory-excursion (string-append out "/lib")
(for-each (lambda (lib)
(define libw.a
(string-append "lib" lib "w.a"))
(define lib.a
(string-append "lib" lib ".a"))
(string-append "lib" lib ""))
(string-append "lib" lib ".so.5"))
(string-append "lib" lib ".so"))
(when (file-exists? libw.a)
(format #t "creating symlinks for `lib~a'~%" lib)
(symlink libw.a lib.a)
(false-if-exception (delete-file
(lambda (p)
(format p "INPUT (-l~aw)~%" lib)))))
'("curses" "ncurses" "form" "panel" "menu")))))))
(name "ncurses")
(version "5.9")
(source (origin
(method http-fetch)
(uri (string-append ""
version ".tar.gz"))
(build-system gnu-build-system)
`("--with-shared" "--without-debug" "--enable-widec"
;; By default headers land in an `ncursesw' subdir, which is not
;; what users expect.
,(string-append "--includedir=" (assoc-ref %outputs "out")
;; C++ bindings fail to build on
;; `i386-pc-solaris2.11' with GCC 3.4.3:
;; <>.
,,@(if (string=? system "i686-solaris")
#:tests? #f ; no "check" target
#:phases (alist-cons-after 'install 'post-install
((system cross-system)
(arguments cross-system))))
(self-native-input? #t)
"GNU Ncurses, a free software emulation of curses in SVR4 and more")
"The Ncurses (new curses) library is a free software emulation of curses
in System V Release 4.0, and more. It uses Terminfo format, supports pads
and color and multiple highlights and forms characters and function-key
mapping, and has all the other SYSV-curses enhancements over BSD Curses.
The ncurses code was developed under GNU/Linux. It has been in use for some
time with OpenBSD as the system curses library, and on FreeBSD and NetBSD as
an external package. It should port easily to any ANSI/POSIX-conforming
UNIX. It has even been ported to OS/2 Warp!")
(license "X11")
(home-page ""))))
(define-public readline
(name "readline")
@ -210,7 +289,7 @@ faster algorithms.")
(build-system gnu-build-system)
(propagated-inputs `(("ncurses" ,(nixpkgs-derivation* "ncurses"))))
(propagated-inputs `(("ncurses" ,ncurses)))
(inputs `(("patch/link-ncurses"
,(search-path %load-path