gnu: sssd: Update to 2.7.4.
[jackhill/guix/guix.git] / gnu / packages / slang.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
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)
25 #:use-module (guix gexp)
26 #:use-module (guix utils)
27 #:use-module (guix build-system gnu)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (gnu packages readline)
30 #:use-module (gnu packages ncurses)
31 #:use-module (gnu packages popt)
32 #:use-module (gnu packages fribidi)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages image)
35 #:use-module (gnu packages pcre)
36 #:use-module (gnu packages python))
37
38 (define-public slang
39 (package
40 (name "slang")
41 (version "2.3.2")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "http://www.jedsoft.org/releases/slang/slang-"
45 version ".tar.bz2"))
46 (sha256
47 (base32
48 "06p379fqn6w38rdpqi98irxi2bf4llb0rja3dlgkqz7nqh7kp7pw"))
49 (modules '((guix build utils)))
50 (snippet
51 #~(begin
52 (substitute* "src/Makefile.in"
53 (("/bin/ln") "ln"))))))
54 (build-system gnu-build-system)
55 (arguments
56 (list #:parallel-tests? #f
57 #:parallel-build? #f ; race to build/use elfobj
58 #:phases
59 #~(modify-phases %standard-phases
60 (add-after 'unpack 'reduce-array-test-size
61 ;; Fix array.sl/array.slc failure on 32-bit systems ("Unable to
62 ;; to create a multi-dimensional array of the desired size").
63 (lambda _
64 (substitute* "src/test/array.sl"
65 (("10000,10000,10000,10000,10000,10000")
66 "10,10,10,10,10,10"))))
67 (add-before 'configure 'fix-configure-script
68 ;; Don't try to link to the long-obsolete (and gone) -ltermcap.
69 (lambda _
70 (substitute* "configure"
71 (("(MISC_TERMINFO_DIRS)=.*" _ variable)
72 (format #f "~a=\"~a/share/terminfo\"\n" variable
73 #$(this-package-input "ncurses")))))))))
74 (inputs
75 (list readline zlib libpng pcre ncurses))
76 (home-page "https://www.jedsoft.org/slang/")
77 (synopsis "Library for interactive applications and extensibility")
78 (description
79 "S-Lang is a multi-platform programmer's library designed to allow a
80 developer to create robust multi-platform software. It provides facilities
81 required by interactive applications such as display/screen management,
82 keyboard input, keymaps, and so on. The most exciting feature of the library
83 is the slang interpreter that may be easily embedded into a program to make it
84 extensible. While the emphasis has always been on the embedded nature of the
85 interpreter, it may also be used in a stand-alone fashion through the use of
86 slsh, which is part of the S-Lang distribution.")
87 (license license:gpl2+)))
88
89 (define-public most
90 (package
91 (name "most")
92 (version "5.1.0")
93 (source
94 (origin
95 (method url-fetch)
96 (uri (string-append "http://www.jedsoft.org/releases/most/most-"
97 version ".tar.gz"))
98 (sha256
99 (base32 "008537ns659pw2aag15imwjrxj73j26aqq90h285is6kz8gmv06v"))
100 (modules '((guix build utils)))
101 (snippet
102 #~(begin
103 (substitute* "src/Makefile.in"
104 (("/bin/cp") "cp"))))))
105 (build-system gnu-build-system)
106 (arguments
107 (list #:configure-flags
108 #~(list (string-append "--with-slang="
109 #$(this-package-input "slang")))
110 #:tests? #f ; no test suite
111 #:phases
112 #~(modify-phases %standard-phases
113 (add-before 'configure 'fix-configure-script
114 ;; Don't try to link to the long-obsolete (and gone) -ltermcap.
115 (lambda _
116 (substitute* "configure"
117 (("(MISC_TERMINFO_DIRS)=.*" _ variable)
118 (format #f "~a=\"~a/share/terminfo\"\n" variable
119 #$(this-package-input "ncurses")))))))))
120 (inputs
121 (list ncurses slang))
122 (home-page "https://www.jedsoft.org/most/")
123 (synopsis
124 "@dfn{Pager} (terminal text viewer) with multiple windows and filters")
125 (description
126 "Most is a paging text viewer. It displays the contents of a file or the
127 output of a command on the terminal, one screenful at a time, and lets you
128 scroll up and down to (re)view the entire text.
129
130 You can open multiple windows within @command{most} to view different files, or
131 to inspect different parts of the same file, at the same time.")
132 (license license:gpl2+)))
133
134 (define-public newt
135 (package
136 (name "newt")
137 (version "0.52.21")
138 (source (origin
139 (method url-fetch)
140 (uri (string-append "https://pagure.io/releases/newt/"
141 "newt-" version ".tar.gz"))
142 (sha256
143 (base32
144 "0cdvbancr7y4nrj8257y5n45hmhizr8isynagy4fpsnpammv8pi6"))))
145 (build-system gnu-build-system)
146 (outputs '("out" "python"))
147 (inputs
148 (list slang popt python fribidi))
149 (arguments
150 (list
151 #:tests? #f ; no test suite
152 #:configure-flags
153 ;; Set the correct RUNPATH in binaries.
154 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
155 #:make-flags
156 ;; configure uses a hard-coded search of /usr/include/python* to set
157 ;; this variable, and does not allow us to override it from the
158 ;; command line. Fortunately, the Makefile does, so provide it here.
159 #~(list
160 (string-append "PYTHONVERS=python"
161 #$(version-major+minor (package-version python))))
162 #:phases
163 #~(modify-phases %standard-phases
164 (add-after 'unpack 'patch-/usr/bin/install
165 (lambda _
166 (substitute* "po/Makefile"
167 (("/usr/bin/install") "install"))))
168 (add-before 'build 'add-python-config-to-path
169 (lambda* (#:key target #:allow-other-keys)
170 ;; When cross-compiling python-config is not present in $PATH.
171 ;;
172 ;; It is a shell script without dependencies on target binaries
173 ;; so it can be run on the host to allow cross-compilation.
174 (when target
175 (let ((path (getenv "PATH"))
176 (py (string-append #$python "/bin")))
177 (setenv "PATH" (string-append path ":" py))))))
178 (add-after 'install 'move-python
179 (lambda* _
180 (let ((ver #$(version-major+minor (package-version python))))
181 (mkdir-p (string-append #$output:python "/lib"))
182 (rename-file
183 (string-append #$output "/lib/python" ver)
184 (string-append #$output:python "/lib/python" ver))))))))
185 (home-page "https://pagure.io/newt")
186 (synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang")
187 (description
188 "Newt is a windowing toolkit for text mode built from the slang library.
189 It allows color text mode applications to easily use stackable windows, push
190 buttons, check boxes, radio buttons, lists, entry fields, labels, and
191 displayable text. Scrollbars are supported, and forms may be nested to
192 provide extra functionality.")
193 (license license:lgpl2.0)))