gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / slang.scm
CommitLineData
e9257d37
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
cac8bc38 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
e5930e5a 4;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
e9257d37
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages slang)
22 #:use-module (guix packages)
23 #:use-module (guix download)
e5930e5a 24 #:use-module (guix utils)
e9257d37
LC
25 #:use-module (guix build-system gnu)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (gnu packages readline)
28 #:use-module (gnu packages ncurses)
cac8bc38
MW
29 #:use-module (gnu packages popt)
30 #:use-module (gnu packages fribidi)
e9257d37
LC
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages image)
e5930e5a
EB
33 #:use-module (gnu packages pcre)
34 #:use-module (gnu packages python))
e9257d37
LC
35
36(define-public slang
37 (package
38 (name "slang")
39 (version "2.3.0")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append
43 "http://www.jedsoft.org/releases/slang/slang-"
44 version
45 ".tar.gz"))
46 (sha256
47 (base32
48 "0aqd2cjabj6nhd4r3dc4vhqif2bf3dmqnrn2gj0xm4gqyfd177jy"))
49 (modules '((guix build utils)))
50 (snippet
51 '(begin
52 (substitute* "src/Makefile.in"
53 (("/bin/ln") "ln"))
54 (substitute* "configure"
55 (("-ltermcap") ""))))))
56 (build-system gnu-build-system)
57 (arguments
ee2a7f07
MW
58 '(#:parallel-tests? #f
59 #:parallel-build? #f)) ; there's at least one race
e9257d37
LC
60 (inputs
61 `(("readline" ,readline)
62 ("zlib" ,zlib)
63 ("libpng" ,libpng)
64 ("pcre" ,pcre)
65 ("ncurses" ,ncurses)))
66 (home-page "http://www.jedsoft.org/slang/")
67 (synopsis "Library for interactive applications and extensibility")
68 (description
69 "S-Lang is a multi-platform programmer's library designed to allow a
e881752c 70developer to create robust multi-platform software. It provides facilities
e9257d37 71required by interactive applications such as display/screen management,
e881752c 72keyboard input, keymaps, and so on. The most exciting feature of the library
e9257d37 73is the slang interpreter that may be easily embedded into a program to make it
e881752c 74extensible. While the emphasis has always been on the embedded nature of the
e9257d37
LC
75interpreter, it may also be used in a stand-alone fashion through the use of
76slsh, which is part of the S-Lang distribution.")
77 (license license:gpl2+)))
cac8bc38
MW
78
79(define-public newt
80 (package
81 (name "newt")
82 (version "0.52.18")
83 (source (origin
84 (method url-fetch)
65375f74 85 (uri (string-append "https://pagure.io/releases/"
cac8bc38
MW
86 name "/" name "-" version ".tar.gz"))
87 (sha256
88 (base32
89 "07n9f2mqsjfj35wx5ldhvl9sqcjqpcl0g4fdd9mawmny9rihw6vp"))))
90 (build-system gnu-build-system)
e5930e5a 91 (outputs '("out" "python"))
cac8bc38
MW
92 (inputs
93 `(("slang" ,slang)
94 ("popt" ,popt)
e5930e5a 95 ("python" ,python)
cac8bc38
MW
96 ("fribidi" ,fribidi)))
97 (arguments
98 `(#:tests? #f ; no test suite
99 #:configure-flags
100 ;; Set the correct RUNPATH in binaries.
101 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
e5930e5a
EB
102 #:make-flags
103 ;; configure does not allow us to override this variable from the
104 ;; command-line. Fortunately, the Makefile does, so provide it here.
105 (list (string-append "PYTHONVERS=python"
106 ,(version-major+minor (package-version python))))
cac8bc38
MW
107 #:phases
108 (modify-phases %standard-phases
109 (add-after
110 'unpack 'patch-/usr/bin/install
111 (lambda _
112 (substitute* "po/Makefile"
113 (("/usr/bin/install") "install"))
e5930e5a
EB
114 #t))
115 (add-after
116 'install 'move-python
117 (lambda* (#:key outputs #:allow-other-keys)
118 (let ((out (assoc-ref outputs "out"))
119 (py (assoc-ref outputs "python"))
120 (ver ,(version-major+minor (package-version python))))
121 (mkdir-p (string-append py "/lib"))
122 (rename-file (string-append out "/lib/python" ver)
123 (string-append py "/lib/python" ver))
124 #t))))))
65375f74 125 (home-page "https://pagure.io/newt")
cac8bc38
MW
126 (synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang")
127 (description
128 "Newt is a windowing toolkit for text mode built from the slang library.
129It allows color text mode applications to easily use stackable windows, push
130buttons, check boxes, radio buttons, lists, entry fields, labels, and
131displayable text. Scrollbars are supported, and forms may be nested to
132provide extra functionality.")
133 (license license:lgpl2.0)))