projects/guix·blob java-team · refs

194 lines · 8.3 KiB

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