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 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
22 (define-module (gnu packages slang)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix utils)
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)
30 #:use-module (gnu packages popt)
31 #:use-module (gnu packages fribidi)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages image)
34 #:use-module (gnu packages pcre)
35 #:use-module (gnu packages python))
43 (uri (string-append "http://www.jedsoft.org/releases/slang/slang-"
47 "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l"))
48 (modules '((guix build utils)))
51 (substitute* "src/Makefile.in"
53 (substitute* "configure"
54 (("-ltermcap") ""))))))
55 (build-system gnu-build-system)
57 '(#:parallel-tests? #f
58 #:parallel-build? #f)) ; there's at least one race
60 `(("readline" ,readline)
64 ("ncurses" ,ncurses)))
65 (home-page "http://www.jedsoft.org/slang/")
66 (synopsis "Library for interactive applications and extensibility")
68 "S-Lang is a multi-platform programmer's library designed to allow a
69 developer to create robust multi-platform software. It provides facilities
70 required by interactive applications such as display/screen management,
71 keyboard input, keymaps, and so on. The most exciting feature of the library
72 is the slang interpreter that may be easily embedded into a program to make it
73 extensible. While the emphasis has always been on the embedded nature of the
74 interpreter, it may also be used in a stand-alone fashion through the use of
75 slsh, which is part of the S-Lang distribution.")
76 (license license:gpl2+)))
84 (uri (string-append "https://pagure.io/releases/"
85 name "/" name "-" version ".tar.gz"))
88 "1g3dpfnvaw7vljbr7nzq1rl88d6r8cmrvvng9inphgzwxxmvlrld"))))
89 (build-system gnu-build-system)
90 (outputs '("out" "python"))
95 ("fribidi" ,fribidi)))
97 `(#:tests? #f ; no test suite
99 ;; Set the correct RUNPATH in binaries.
100 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
102 ;; configure uses a hard-coded search of /usr/include/python* to set
103 ;; this variable, and does not allow us to override it 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))))
108 (modify-phases %standard-phases
110 'unpack 'patch-/usr/bin/install
112 (substitute* "po/Makefile"
113 (("/usr/bin/install") "install"))
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))
125 (home-page "https://pagure.io/newt")
126 (synopsis "Not Erik's Windowing Toolkit - text mode windowing with slang")
128 "Newt is a windowing toolkit for text mode built from the slang library.
129 It allows color text mode applications to easily use stackable windows, push
130 buttons, check boxes, radio buttons, lists, entry fields, labels, and
131 displayable text. Scrollbars are supported, and forms may be nested to
132 provide extra functionality.")
133 (license license:lgpl2.0)))