diff options
author | ng0 <ng0@we.make.ritual.n0.is> | 2016-07-23 13:03:22 +0000 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2016-09-07 09:06:10 +0300 |
commit | b393a44cd030637778386f79ad444c0116ede5a9 (patch) | |
tree | 122289c585c383acbcafc59fcd75fa3a3505aaea /gnu | |
parent | abc114bdd9f933739733fd6eecdcdb51f8725161 (diff) | |
download | guix-b393a44cd030637778386f79ad444c0116ede5a9.tar guix-b393a44cd030637778386f79ad444c0116ede5a9.tar.gz |
gnu: Add perl-curses.
* gnu/packages/ncurses.scm (perl-curses): New variable.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/ncurses.scm | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm index 147033a7e5..97991670f3 100644 --- a/gnu/packages/ncurses.scm +++ b/gnu/packages/ncurses.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> +;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +23,10 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) + #:use-module (gnu packages) + #:use-module (gnu packages perl)) (define-public ncurses (let ((patch-makefile-phase @@ -161,3 +165,45 @@ curses widgets, such as dialog boxes.") (home-page "http://invisible-island.net/dialog/dialog.html") ;; Includes the gpl3 file "config.sub" from Automake. (license (list lgpl2.1 gpl3)))) + +(define-public perl-curses + (package + (name "perl-curses") + (version "1.36") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/G/GI/GIRAFFED/" + "Curses-" version ".tar.gz")) + (sha256 + (base32 + "0r6xd9wr0c25rr28zixhqipak575zqsfb7r7f2693i9il1dpj554")))) + (build-system perl-build-system) + (inputs + `(("ncurses" ,ncurses))) + (arguments + `(#:make-maker-flags (list "PANELS" "MENUS") + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-curses-ldflags + (lambda* (#:key inputs #:allow-other-keys) + (let* ((ncurses (assoc-ref inputs "ncurses")) + (include (string-append ncurses "/include")) + (lib (string-append ncurses "/lib"))) + (setenv "CURSES_LIBTYPE" "ncurses") + (setenv "CURSES_CFLAGS" (string-append "-I" include)) + (setenv "CURSES_PANEL_CFLAGS" (string-append "-I" include)) + (setenv "CURSES_MENU_CFLAGS" (string-append "-I" include)) + (setenv "CURSES_FORM_CFLAGS" (string-append "-I" include)) + (setenv "CURSES_LDFLAGS" (string-append "-L" lib " -lncurses")) + (setenv "CURSES_PANEL_LDFLAGS" (string-append "-L" lib " -lpanel")) + (setenv "CURSES_MENU_LDFLAGS" (string-append "-L" lib " -lmenu")) + (setenv "CURSES_FORM_LDFLAGS" (string-append "-L" lib " -lform")) + #t)))))) + (home-page "http://search.cpan.org/dist/Curses") + (synopsis "Terminal screen handling and optimization") + (description + "@code{Curses} is the interface between Perl and the curses library +of your system.") + (license (package-license perl)))) |