| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 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 |
| 59 | #:phases
|
| 60 | #~(modify-phases %standard-phases
|
| 61 | (add-after 'unpack 'reduce-array-test-size
|
| 62 | |
| 63 | |
| 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 | |
| 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
|
| 81 | developer to create robust multi-platform software. It provides facilities
|
| 82 | required by interactive applications such as display/screen management,
|
| 83 | keyboard input, keymaps, and so on. The most exciting feature of the library
|
| 84 | is the slang interpreter that may be easily embedded into a program to make it
|
| 85 | extensible. While the emphasis has always been on the embedded nature of the
|
| 86 | interpreter, it may also be used in a stand-alone fashion through the use of
|
| 87 | slsh, 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 |
| 112 | #:phases
|
| 113 | #~(modify-phases %standard-phases
|
| 114 | (add-before 'configure 'fix-configure-script
|
| 115 | |
| 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
|
| 128 | output of a command on the terminal, one screenful at a time, and lets you
|
| 129 | scroll up and down to (re)view the entire text.
|
| 130 |
|
| 131 | You can open multiple windows within @command{most} to view different files, or
|
| 132 | to 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 |
| 153 | #:configure-flags
|
| 154 | |
| 155 | #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
|
| 156 | #:make-flags
|
| 157 | |
| 158 | |
| 159 | |
| 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 | |
| 172 | |
| 173 | |
| 174 | |
| 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.
|
| 190 | It allows color text mode applications to easily use stackable windows, push
|
| 191 | buttons, check boxes, radio buttons, lists, entry fields, labels, and
|
| 192 | displayable text. Scrollbars are supported, and forms may be nested to
|
| 193 | provide extra functionality.")
|
| 194 | (license license:lgpl2.0)))
|