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