Commit | Line | Data |
---|---|---|
54899414 MJ |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com> | |
8efd807f | 3 | ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com> |
76f31f0b | 4 | ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net> |
f3f82d1d | 5 | ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> |
23e89f91 | 6 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
f80d6ea2 | 7 | ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net> |
f69f37d5 | 8 | ;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca> |
ad81708d | 9 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
729f582a | 10 | ;;; Copyright © 2020 aecepoglu <aecepoglu@fastmail.fm> |
862a8861 | 11 | ;;; Copyright © 2020 Dion Mendel <guix@dm9.info> |
348c70f3 | 12 | ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> |
b0e8ccbe AV |
13 | ;;; Copyright © 2021 Alexandr Vityazev <avityazev@posteo.org> |
14 | ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> | |
bcce83c7 | 15 | ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> |
d0313cdf | 16 | ;;; Copyright © 2021 Wiktor Żelazny <wzelazny@vurv.cz> |
54899414 MJ |
17 | ;;; |
18 | ;;; This file is part of GNU Guix. | |
19 | ;;; | |
20 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
21 | ;;; under the terms of the GNU General Public License as published by | |
22 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
23 | ;;; your option) any later version. | |
24 | ;;; | |
25 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
26 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 | ;;; GNU General Public License for more details. | |
29 | ;;; | |
30 | ;;; You should have received a copy of the GNU General Public License | |
31 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
32 | ||
33 | (define-module (gnu packages shellutils) | |
e3e8924d | 34 | #:use-module ((guix licenses) #:prefix license:) |
f0e14975 | 35 | #:use-module (guix utils) |
54899414 MJ |
36 | #:use-module (guix packages) |
37 | #:use-module (guix download) | |
31b61956 | 38 | #:use-module (guix git-download) |
f0e14975 EF |
39 | #:use-module (guix build-system gnu) |
40 | #:use-module (guix build-system go) | |
41 | #:use-module (guix build-system python) | |
f80d6ea2 | 42 | #:use-module (gnu packages autotools) |
f0e14975 | 43 | #:use-module (gnu packages base) |
729f582a | 44 | #:use-module (gnu packages bison) |
45 | #:use-module (gnu packages flex) | |
f0e14975 | 46 | #:use-module (gnu packages golang) |
b5602ef7 | 47 | #:use-module (gnu packages libunistring) |
f80d6ea2 | 48 | #:use-module (gnu packages ncurses) |
b5602ef7 | 49 | #:use-module (gnu packages pcre) |
f80d6ea2 | 50 | #:use-module (gnu packages pkg-config) |
f0e14975 EF |
51 | #:use-module (gnu packages python) |
52 | #:use-module (gnu packages readline) | |
8ebd56ea | 53 | #:use-module (gnu packages ruby) |
8ebd56ea | 54 | #:use-module (gnu packages shells) |
b5602ef7 TGR |
55 | #:use-module (gnu packages tmux) |
56 | #:use-module (gnu packages vim)) | |
54899414 | 57 | |
ea18b4c5 FCW |
58 | (define-public ascii |
59 | (package | |
60 | (name "ascii") | |
61 | (version "3.18") | |
62 | (source (origin | |
63 | (method url-fetch) | |
64 | (uri (string-append "http://www.catb.org/~esr/ascii/" | |
65 | "ascii-" version ".tar.gz")) | |
66 | (sha256 | |
67 | (base32 | |
68 | "0b87vy06s8s3a8q70pqavsbk4m4ff034sdml2xxa6qfsykaj513j")))) | |
69 | (build-system gnu-build-system) | |
70 | (arguments `(#:make-flags | |
71 | (list (string-append "CC=" ,(cc-for-target)) | |
72 | (string-append "PREFIX=" %output)) | |
73 | #:phases | |
74 | (modify-phases %standard-phases | |
75 | (delete 'configure) | |
76 | (add-before 'install 'create-directories | |
77 | (lambda* (#:key outputs #:allow-other-keys) | |
78 | (let* ((out (assoc-ref outputs "out")) | |
79 | (bin (string-append out "/bin")) | |
80 | (man1 (string-append out "/share/man/man1"))) | |
81 | (mkdir-p bin) | |
82 | (mkdir-p man1))))) | |
83 | #:tests? #f)) | |
84 | (home-page "http://www.catb.org/~esr/ascii/") | |
85 | (synopsis "ASCII name and synonym chart") | |
86 | (description | |
87 | "The @code{ascii} utility provides easy conversion between various byte | |
88 | representations and the American Standard Code for Information Interchange | |
89 | (ASCII) character table. It knows about a wide variety of hex, binary, octal, | |
90 | Teletype mnemonic, ISO/ECMA code point, slang names, XML entity names, and | |
91 | other representations. Given any one on the command line, it will try to | |
92 | display all others. Called with no arguments it displays a handy small ASCII | |
93 | chart.") | |
94 | (license license:bsd-2))) | |
95 | ||
729f582a | 96 | (define-public boxes |
97 | (package | |
98 | (name "boxes") | |
b5602ef7 | 99 | (version "2.1.1") |
729f582a | 100 | (source (origin |
101 | (method git-fetch) | |
102 | (uri (git-reference | |
103 | (url "https://github.com/ascii-boxes/boxes") | |
104 | (commit (string-append "v" version)))) | |
105 | (file-name (git-file-name name version)) | |
106 | (sha256 | |
6054b7d8 | 107 | (base32 |
b5602ef7 | 108 | "1bf5rnfiw04ffs1l17zhbg4wvq2vfn2qbz1xmd250xqj15lysw88")))) |
729f582a | 109 | (build-system gnu-build-system) |
110 | (arguments | |
111 | `(#:test-target "test" | |
112 | #:make-flags (list (string-append "GLOBALCONF=" | |
113 | (assoc-ref %outputs "out") | |
114 | "/etc/boxes-config")) | |
98014663 TGR |
115 | #:modules |
116 | ((ice-9 match) | |
117 | ,@%gnu-build-system-modules) | |
729f582a | 118 | #:phases |
119 | (modify-phases %standard-phases | |
120 | (delete 'configure) | |
121 | (replace 'install | |
122 | (lambda* (#:key outputs #:allow-other-keys) | |
98014663 TGR |
123 | (let ((out (assoc-ref outputs "out"))) |
124 | (for-each (match-lambda | |
125 | ((source target) | |
126 | (install-file source | |
127 | (string-append out "/" target)))) | |
128 | '(("out/boxes" "bin/") | |
129 | ("doc/boxes.1" "share/man/man1/") | |
130 | ("boxes-config" "etc/"))))))))) | |
b5602ef7 | 131 | (native-inputs |
8394619b LC |
132 | (list bison flex |
133 | ;; For the tests. | |
134 | xxd)) | |
b5602ef7 | 135 | (inputs |
8394619b | 136 | (list libunistring pcre2)) |
ed0215d3 | 137 | (home-page "https://boxes.thomasjensen.com") |
729f582a | 138 | (synopsis "Command line ASCII boxes") |
139 | (description | |
140 | "This command-line filter program draws ASCII-art boxes around your input | |
141 | text.") | |
729f582a | 142 | (license license:gpl2))) |
143 | ||
8ebd56ea CD |
144 | (define-public zsh-autosuggestions |
145 | (package | |
146 | (name "zsh-autosuggestions") | |
ae004cea | 147 | (version "0.7.0") |
8ebd56ea CD |
148 | (source (origin |
149 | (method git-fetch) | |
150 | (uri (git-reference | |
b0e7b699 | 151 | (url "https://github.com/zsh-users/zsh-autosuggestions") |
8ebd56ea CD |
152 | (commit (string-append "v" version)))) |
153 | (file-name (git-file-name name version)) | |
154 | (sha256 | |
155 | (base32 | |
ae004cea | 156 | "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98")))) |
8ebd56ea CD |
157 | (build-system gnu-build-system) |
158 | (native-inputs | |
8394619b LC |
159 | (list ruby |
160 | ruby-byebug | |
161 | ruby-pry | |
162 | ruby-rspec | |
163 | ruby-rspec-wait | |
164 | tmux | |
165 | zsh)) | |
8ebd56ea CD |
166 | (arguments |
167 | '(#:phases | |
168 | (modify-phases %standard-phases | |
348c70f3 BW |
169 | (add-after 'unpack 'patch-tests |
170 | (lambda _ | |
171 | ;; Failing tests since tmux-3.2a | |
172 | (delete-file "spec/options/buffer_max_size_spec.rb"))) | |
8ebd56ea CD |
173 | (delete 'configure) |
174 | (replace 'check ; Tests use ruby's bundler; instead execute rspec directly. | |
175 | (lambda _ | |
176 | (setenv "TMUX_TMPDIR" (getenv "TMPDIR")) | |
177 | (setenv "SHELL" (which "zsh")) | |
178 | (invoke "rspec"))) | |
179 | (replace 'install | |
180 | (lambda* (#:key outputs #:allow-other-keys) | |
181 | (let* ((out (assoc-ref outputs "out")) | |
182 | (zsh-plugins | |
183 | (string-append out "/share/zsh/plugins/zsh-autosuggestions"))) | |
184 | (invoke "make" "all") | |
185 | (install-file "zsh-autosuggestions.zsh" zsh-plugins) | |
186 | #t)))))) | |
187 | (home-page "https://github.com/zsh-users/zsh-autosuggestions") | |
188 | (synopsis "Fish-like autosuggestions for zsh") | |
189 | (description | |
190 | "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands | |
191 | as you type.") | |
192 | (license license:expat))) | |
193 | ||
b0e8ccbe AV |
194 | (define-public zsh-syntax-highlighting |
195 | (package | |
196 | (name "zsh-syntax-highlighting") | |
197 | (version "0.7.1") | |
198 | (source (origin | |
199 | (method git-fetch) | |
200 | (uri (git-reference | |
201 | (url "https://github.com/zsh-users/zsh-syntax-highlighting") | |
202 | (commit version))) | |
203 | (file-name (git-file-name name version)) | |
204 | (sha256 | |
205 | (base32 | |
206 | "039g3n59drk818ylcyvkciv8k9mf739cv6v4vis1h9fv9whbcmwl")))) | |
207 | (build-system gnu-build-system) | |
208 | (native-inputs | |
8394619b | 209 | (list zsh)) |
b0e8ccbe AV |
210 | (arguments |
211 | ;; FIXME: Tests fail when running test regexp | |
212 | ;; there is no pcre module in the Guix zsh package | |
213 | `(#:tests? #f | |
214 | #:phases | |
215 | (modify-phases %standard-phases | |
216 | (delete 'configure) | |
217 | (add-after 'unpack 'patch-paths | |
218 | (lambda* (#:key outputs #:allow-other-keys) | |
219 | (let ((out (assoc-ref outputs "out"))) | |
220 | (substitute* "Makefile" | |
221 | (("/usr/local") out) | |
222 | (("share/\\$\\(NAME\\)") "share/zsh/plugins/$(NAME)"))))) | |
223 | (add-after 'patch-paths 'make-writable | |
224 | (lambda _ | |
225 | (for-each make-file-writable | |
226 | '("docs/highlighters.md" | |
227 | "README.md")))) | |
228 | (add-before 'build 'add-all-md | |
229 | (lambda _ | |
230 | (invoke "make" "all"))) | |
231 | (replace 'check | |
232 | (lambda* (#:key tests? #:allow-other-keys) | |
233 | (when tests? | |
234 | (invoke "make" "test") | |
235 | (invoke "make" "perf"))))))) | |
236 | (home-page "https://github.com/zsh-users/zsh-syntax-highlighting") | |
237 | (synopsis "Fish shell-like syntax highlighting for Zsh") | |
238 | (description | |
239 | "This package provides syntax highlighting for Zsh. It enables | |
240 | highlighting of commands whilst they are typed at a Zsh prompt into an | |
241 | interactive terminal. This helps in reviewing commands before running them, | |
242 | particularly in catching syntax errors.") | |
243 | (license license:bsd-3))) | |
244 | ||
f69f37d5 CD |
245 | (define-public sh-z |
246 | (package | |
247 | (name "sh-z") | |
248 | (version "1.11") | |
249 | (source (origin | |
250 | (method git-fetch) | |
251 | (uri (git-reference | |
b0e7b699 | 252 | (url "https://github.com/rupa/z") |
f69f37d5 CD |
253 | (commit (string-append "v" version)))) |
254 | (file-name (git-file-name name version)) | |
255 | (sha256 | |
256 | (base32 | |
257 | "13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb")))) | |
258 | (build-system gnu-build-system) | |
259 | (arguments | |
260 | `(#:tests? #f ; No tests provided | |
261 | #:phases | |
262 | (modify-phases %standard-phases | |
263 | (delete 'configure) | |
264 | (delete 'build) | |
265 | (replace 'install | |
266 | (lambda* (#:key outputs #:allow-other-keys) | |
267 | (let* ((out (assoc-ref outputs "out")) | |
268 | (man (string-append out "/share/man/man1")) | |
269 | (bin (string-append out "/bin"))) | |
270 | (install-file "z.sh" bin) | |
271 | (chmod (string-append bin "/z.sh") #o755) | |
272 | (install-file "z.1" man) | |
273 | #t)))))) | |
274 | (synopsis "Jump about directories") | |
275 | (description | |
276 | "Tracks your most used directories, based on ``frecency''. After a short | |
277 | learning phase, z will take you to the most ``frecent'' directory that matches | |
278 | all of the regexes given on the command line in order.") | |
279 | (home-page "https://github.com/rupa/z") | |
280 | (license license:expat))) | |
281 | ||
54899414 MJ |
282 | (define-public envstore |
283 | (package | |
284 | (name "envstore") | |
285 | (version "2.1") | |
286 | (source | |
287 | (origin | |
288 | (method url-fetch) | |
289 | (uri (string-append "https://finalrewind.org/projects/" | |
290 | name "/" name "-" version ".tar.bz2")) | |
291 | (sha256 | |
292 | (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi")))) | |
293 | (build-system gnu-build-system) | |
294 | (arguments | |
295 | `(#:test-target "test" | |
296 | #:make-flags (list "CC=gcc" | |
297 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
298 | #:phases | |
299 | (modify-phases %standard-phases | |
300 | (delete 'configure)))) | |
301 | (home-page "https://finalrewind.org/projects/envstore/") | |
302 | (synopsis "Save and restore environment variables") | |
303 | (description "Envstore is a program for sharing environment variables | |
304 | between various shells or commands.") | |
ac44b39a | 305 | (license license:wtfpl2))) |
92c2f605 AG |
306 | |
307 | (define-public trash-cli | |
308 | (package | |
309 | (name "trash-cli") | |
33884385 | 310 | (version "0.17.1.14") |
92c2f605 AG |
311 | (source |
312 | (origin | |
313 | (method url-fetch) | |
314 | (uri (pypi-uri "trash-cli" version)) | |
315 | (sha256 | |
316 | (base32 | |
33884385 | 317 | "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h")))) |
92c2f605 AG |
318 | (build-system python-build-system) |
319 | (arguments | |
320 | `(#:python ,python-2 | |
321 | #:tests? #f ; no tests | |
322 | #:phases | |
323 | (modify-phases %standard-phases | |
324 | (add-before 'build 'patch-path-constants | |
325 | (lambda* (#:key inputs #:allow-other-keys) | |
326 | (let ((libc (assoc-ref inputs "libc")) | |
327 | (coreutils (assoc-ref inputs "coreutils"))) | |
328 | (substitute* "trashcli/list_mount_points.py" | |
329 | (("\"/lib/libc.so.6\".*") | |
330 | (string-append "\"" libc "/lib/libc.so.6\"\n")) | |
331 | (("\"df\"") | |
332 | (string-append "\"" coreutils "/bin/df\""))))))))) | |
8394619b | 333 | (inputs (list coreutils)) |
92c2f605 AG |
334 | (home-page "https://github.com/andreafrancia/trash-cli") |
335 | (synopsis "Trash can management tool") | |
336 | (description | |
337 | "trash-cli is a command line utility for interacting with the | |
338 | FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop | |
339 | environments. It can move files to the trash, and remove or list files that | |
340 | are already there.") | |
e3e8924d | 341 | (license license:gpl2+))) |
76f31f0b CB |
342 | |
343 | (define-public direnv | |
344 | (package | |
345 | (name "direnv") | |
f5a7a42d | 346 | (version "2.28.0") |
76f31f0b | 347 | (source |
81aa6c72 CB |
348 | (origin (method git-fetch) |
349 | (uri (git-reference | |
b0e7b699 | 350 | (url "https://github.com/direnv/direnv") |
81aa6c72 CB |
351 | (commit (string-append "v" version)))) |
352 | (file-name (git-file-name name version)) | |
76f31f0b CB |
353 | (sha256 |
354 | (base32 | |
f5a7a42d | 355 | "0yk53jn7wafklixclka17wyjjs2g5giigjr2bd0xzy10nrzwp7c9")))) |
81aa6c72 | 356 | (build-system go-build-system) |
76f31f0b | 357 | (arguments |
81aa6c72 | 358 | '(#:import-path "github.com/direnv/direnv" |
39ea311c LF |
359 | #:phases |
360 | (modify-phases %standard-phases | |
862a8861 DM |
361 | (add-after 'install 'install-manpages |
362 | (lambda* (#:key outputs #:allow-other-keys) | |
363 | (let* ((out (assoc-ref outputs "out")) | |
364 | (man (string-append out "/share/man/man1"))) | |
365 | (mkdir-p man) | |
366 | (with-directory-excursion "src/github.com/direnv/direnv" | |
367 | (install-file "man/direnv.1" man) | |
368 | (install-file "man/direnv-stdlib.1" man) | |
369 | (install-file "man/direnv.toml.1" man))))) | |
81aa6c72 CB |
370 | (replace 'check |
371 | (lambda* (#:key tests? #:allow-other-keys) | |
372 | (when tests? | |
373 | (setenv "HOME" "/tmp") | |
374 | (with-directory-excursion "src/github.com/direnv/direnv" | |
375 | ;; The following file needs to be writable so it can be | |
376 | ;; modified by the testsuite. | |
377 | (make-file-writable "test/scenarios/base/.envrc") | |
f5a7a42d AC |
378 | ;; We need to manually run test because make test |
379 | ;; tries to use go modules | |
380 | (invoke "go" "test" "./...") | |
81aa6c72 CB |
381 | ;; Clean up from the tests, especially so that the extra |
382 | ;; direnv executable that's generated is removed. | |
383 | (invoke "make" "clean"))) | |
384 | #t))))) | |
9729b6ea | 385 | (native-inputs |
8394619b LC |
386 | (list go-github-com-burntsushi-toml go-github-com-direnv-go-dotenv |
387 | go-github-com-mattn-go-isatty go-golang-org-x-mod which)) | |
6137da88 | 388 | (home-page "https://direnv.net/") |
76f31f0b | 389 | (synopsis "Environment switcher for the shell") |
a6317919 TGR |
390 | (description |
391 | "direnv can hook into the bash, zsh, tcsh, and fish shells to load | |
76f31f0b | 392 | or unload environment variables depending on the current directory. This |
a6317919 | 393 | allows project-specific environment variables without using @file{~/.profile}. |
76f31f0b | 394 | |
a6317919 TGR |
395 | Before each prompt, direnv checks for the existence of a @file{.envrc} file in |
396 | the current and parent directories. This file is then used to alter the | |
397 | environment variables of the current shell.") | |
e3e8924d | 398 | (license license:expat))) |
f3f82d1d SR |
399 | |
400 | (define-public fzy | |
401 | (package | |
402 | (name "fzy") | |
2792d8a8 | 403 | (version "1.0") |
f3f82d1d SR |
404 | (source |
405 | (origin | |
31b61956 TGR |
406 | (method git-fetch) |
407 | (uri (git-reference | |
b0e7b699 | 408 | (url "https://github.com/jhawthorn/fzy") |
31b61956 TGR |
409 | (commit version))) |
410 | (file-name (git-file-name name version)) | |
f3f82d1d SR |
411 | (sha256 |
412 | (base32 | |
2792d8a8 | 413 | "1gkzdvj73f71388jvym47075l9zw61v6l8wdv2lnc0mns6dxig0k")))) |
f3f82d1d SR |
414 | (build-system gnu-build-system) |
415 | (arguments | |
416 | '(#:make-flags (list "CC=gcc" | |
417 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
418 | #:phases | |
419 | (modify-phases %standard-phases | |
420 | (delete 'configure)))) | |
421 | (home-page "https://github.com/jhawthorn/fzy") | |
422 | (synopsis "Fast fuzzy text selector for the terminal with an advanced | |
423 | scoring algorithm") | |
424 | (description | |
425 | "Most other fuzzy matchers sort based on the length of a match. fzy tries | |
426 | to find the result the user intended. It does this by favouring matches on | |
427 | consecutive letters and starts of words. This allows matching using acronyms | |
428 | or different parts of the path. | |
429 | ||
430 | fzy is designed to be used both as an editor plugin and on the command | |
431 | line. Rather than clearing the screen, fzy displays its interface directly | |
432 | below the current cursor position, scrolling the screen if necessary.") | |
e3e8924d | 433 | (license license:expat))) |
f80d6ea2 BS |
434 | |
435 | (define-public hstr | |
436 | (package | |
437 | (name "hstr") | |
8afa0090 | 438 | (version "2.5") |
f80d6ea2 | 439 | (source (origin |
2bbda4f0 EF |
440 | (method git-fetch) |
441 | (uri (git-reference | |
b0e7b699 | 442 | (url "https://github.com/dvorka/hstr") |
2bbda4f0 EF |
443 | (commit version))) |
444 | (file-name (git-file-name name version)) | |
f80d6ea2 BS |
445 | (sha256 |
446 | (base32 | |
8afa0090 | 447 | "0xg10jyiq12bcygi6aa9qq9pki7bipdsvsza037p2iqix19jg0x8")))) |
f80d6ea2 BS |
448 | (build-system gnu-build-system) |
449 | (arguments | |
450 | `(#:phases | |
451 | (modify-phases %standard-phases | |
452 | (add-before 'build 'adjust-ncurses-includes | |
453 | (lambda* (#:key make-flags outputs #:allow-other-keys) | |
454 | (let ((out (assoc-ref outputs "out"))) | |
455 | (substitute* "src/include/hstr_curses.h" | |
456 | (("ncursesw\\/curses.h") "ncurses.h")) | |
457 | (substitute* "src/include/hstr.h" | |
458 | (("ncursesw\\/curses.h") "ncurses.h"))) | |
459 | #t))))) | |
460 | (native-inputs | |
8394619b | 461 | (list autoconf automake pkg-config)) |
f80d6ea2 | 462 | (inputs |
8394619b | 463 | (list ncurses readline)) |
f80d6ea2 BS |
464 | (synopsis "Navigate and search command history with shell history suggest box") |
465 | (description "HSTR (HiSToRy) is a command-line utility that brings | |
466 | improved Bash and Zsh command completion from the history. It aims to make | |
467 | completion easier and more efficient than with @kbd{Ctrl-R}. It allows you to | |
468 | easily view, navigate, and search your command history with suggestion boxes. | |
469 | HSTR can also manage your command history (for instance you can remove | |
470 | commands that are obsolete or contain a piece of sensitive information) or | |
471 | bookmark your favourite commands.") | |
472 | (home-page "http://me.mindforger.com/projects/hh.html") | |
e3e8924d | 473 | (license license:asl2.0))) |
39bf4e0b OP |
474 | |
475 | (define-public shell-functools | |
476 | (package | |
477 | (name "shell-functools") | |
478 | (version "0.3.0") | |
479 | (source (origin | |
480 | (method git-fetch) | |
481 | (uri (git-reference | |
b0e7b699 | 482 | (url "https://github.com/sharkdp/shell-functools") |
39bf4e0b OP |
483 | (commit (string-append "v" version)))) |
484 | (file-name (git-file-name name version)) | |
485 | (sha256 | |
486 | (base32 | |
487 | "0d6zzg7cxfrzwzh1wmpj7q85kz33sak6ac59ncsm6dlbin12h0hi")))) | |
488 | (build-system python-build-system) | |
489 | (home-page "https://github.com/sharkdp/shell-functools/") | |
490 | (synopsis "Functional programming tools for the shell") | |
491 | (description "This package provides higher order functions like map, | |
492 | filter, foldl, sort_by and take_while as simple command-line tools. Following | |
493 | the UNIX philosophy, these commands are designed to be composed via pipes. A | |
494 | large collection of functions such as basename, replace, contains or is_dir | |
495 | are provided as arguments to these commands.") | |
496 | (license license:expat))) | |
bcce83c7 FCW |
497 | |
498 | (define-public rig | |
499 | (package | |
500 | (name "rig") | |
501 | (version "1.11") | |
502 | (source (origin | |
503 | (method url-fetch) | |
504 | (uri (string-append "mirror://sourceforge/rig/rig/" | |
505 | version "/rig-" | |
506 | version ".tar.gz")) | |
507 | (sha256 | |
508 | (base32 | |
509 | "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0")))) | |
510 | (build-system gnu-build-system) | |
511 | (arguments `(#:make-flags | |
512 | (list (string-append "CXX=" ,(cxx-for-target)) | |
513 | (string-append "PREFIX=" %output)) | |
514 | #:phases | |
515 | (modify-phases %standard-phases | |
516 | (delete 'configure) | |
517 | (add-after 'unpack 'fix-build | |
518 | (lambda _ | |
519 | (substitute* "rig.cc" | |
520 | (("^#include <string>") | |
521 | "#include <cstring>")) | |
522 | (substitute* "Makefile" | |
523 | (("g\\+\\+") | |
524 | "${CXX} -O2") | |
525 | (("install -g 0 -m 755 -o 0 -s rig \\$\\(BINDIR\\)") | |
526 | "install -m 755 -d $(DESTDIR)$(BINDIR)\n\t\ | |
527 | install -m 755 rig $(DESTDIR)$(BINDIR)/rig") | |
528 | (("install -g 0 -m 644 -o 0 rig.6 \\$\\(MANDIR\\)/man6/rig.6") | |
529 | "install -m 755 -d $(DESTDIR)$(MANDIR)/man6/\n\t\ | |
530 | install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6") | |
531 | (("install -g 0 -m 755 -o 0 -d \\$\\(DATADIR\\)") | |
532 | "install -m 755 -d $(DESTDIR)$(DATADIR)") | |
533 | (("install -g 0 -m 644 -o 0 data/\\*.idx \\$\\(DATADIR\\)") | |
534 | "install -m 644 data/*.idx $(DESTDIR)$(DATADIR)"))))) | |
535 | #:tests? #f)) | |
536 | (home-page "http://rig.sourceforge.net") | |
537 | (synopsis "Random identity generator") | |
538 | (description | |
539 | "RIG (Random Identity Generator) generates random, yet real-looking, | |
540 | personal data. It is useful if you need to feed a name to a Web site, BBS, or | |
541 | real person, and are too lazy to think of one yourself. Also, if the Web | |
542 | site/BBS/person you are giving the information to tries to cross-check the | |
543 | city, state, zip, or area code, it will check out.") | |
544 | (license license:gpl2+))) | |
d0313cdf WŻ |
545 | |
546 | (define-public renameutils | |
547 | (package | |
548 | (name "renameutils") | |
549 | (version "0.12.0") | |
550 | (source | |
551 | (origin | |
552 | (method url-fetch) | |
2bb0d8bf LC |
553 | (uri (string-append "mirror://savannah/renameutils/" |
554 | "renameutils-" version ".tar.gz")) | |
d0313cdf WŻ |
555 | (sha256 |
556 | (base32 | |
557 | "18xlkr56jdyajjihcmfqlyyanzyiqqlzbhrm6695mkvw081g1lnb")) | |
558 | (modules '((guix build utils))) | |
559 | (snippet '(begin | |
560 | (substitute* "src/Makefile.in" | |
561 | (("\\(\\$bindir\\)") "$(bindir)")) | |
562 | #t)))) | |
563 | (build-system gnu-build-system) | |
564 | (inputs | |
8394619b | 565 | (list readline)) |
d0313cdf WŻ |
566 | (home-page "https://www.nongnu.org/renameutils/") |
567 | (synopsis "File renaming utilities") | |
2bb0d8bf LC |
568 | (description "The file renaming utilities (renameutils for short) are a |
569 | set of programs designed to make renaming of files faster and less cumbersome. | |
570 | The file renaming utilities consists of five programs: @command{qmv}, | |
571 | @command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.") | |
572 | (license license:gpl3+))) |