| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 |
|
| 34 | (define-module (gnu packages shellutils)
|
| 35 | #:use-module ((guix licenses) #:prefix license:)
|
| 36 | #:use-module (guix gexp)
|
| 37 | #:use-module (guix utils)
|
| 38 | #:use-module (guix packages)
|
| 39 | #:use-module (guix download)
|
| 40 | #:use-module (guix git-download)
|
| 41 | #:use-module (guix build-system copy)
|
| 42 | #:use-module (guix build-system gnu)
|
| 43 | #:use-module (guix build-system go)
|
| 44 | #:use-module (guix build-system python)
|
| 45 | #:use-module (gnu packages autotools)
|
| 46 | #:use-module (gnu packages base)
|
| 47 | #:use-module (gnu packages bison)
|
| 48 | #:use-module (gnu packages check)
|
| 49 | #:use-module (gnu packages flex)
|
| 50 | #:use-module (gnu packages golang)
|
| 51 | #:use-module (gnu packages libunistring)
|
| 52 | #:use-module (gnu packages ncurses)
|
| 53 | #:use-module (gnu packages pcre)
|
| 54 | #:use-module (gnu packages pkg-config)
|
| 55 | #:use-module (gnu packages python)
|
| 56 | #:use-module (gnu packages python-xyz)
|
| 57 | #:use-module (gnu packages readline)
|
| 58 | #:use-module (gnu packages ruby)
|
| 59 | #:use-module (gnu packages shells)
|
| 60 | #:use-module (gnu packages textutils)
|
| 61 | #:use-module (gnu packages tmux)
|
| 62 | #:use-module (gnu packages vim))
|
| 63 |
|
| 64 | (define-public ascii
|
| 65 | (package
|
| 66 | (name "ascii")
|
| 67 | (version "3.18")
|
| 68 | (source (origin
|
| 69 | (method url-fetch)
|
| 70 | (uri (string-append "http://www.catb.org/~esr/ascii/"
|
| 71 | "ascii-" version ".tar.gz"))
|
| 72 | (sha256
|
| 73 | (base32
|
| 74 | "0b87vy06s8s3a8q70pqavsbk4m4ff034sdml2xxa6qfsykaj513j"))))
|
| 75 | (build-system gnu-build-system)
|
| 76 | (arguments `(#:make-flags
|
| 77 | (list (string-append "CC=" ,(cc-for-target))
|
| 78 | (string-append "PREFIX=" %output))
|
| 79 | #:phases
|
| 80 | (modify-phases %standard-phases
|
| 81 | (delete 'configure)
|
| 82 | (add-before 'install 'create-directories
|
| 83 | (lambda* (#:key outputs #:allow-other-keys)
|
| 84 | (let* ((out (assoc-ref outputs "out"))
|
| 85 | (bin (string-append out "/bin"))
|
| 86 | (man1 (string-append out "/share/man/man1")))
|
| 87 | (mkdir-p bin)
|
| 88 | (mkdir-p man1)))))
|
| 89 | #:tests? #f))
|
| 90 | (home-page "http://www.catb.org/~esr/ascii/")
|
| 91 | (synopsis "ASCII name and synonym chart")
|
| 92 | (description
|
| 93 | "The @code{ascii} utility provides easy conversion between various byte
|
| 94 | representations and the American Standard Code for Information Interchange
|
| 95 | (ASCII) character table. It knows about a wide variety of hex, binary, octal,
|
| 96 | Teletype mnemonic, ISO/ECMA code point, slang names, XML entity names, and
|
| 97 | other representations. Given any one on the command line, it will try to
|
| 98 | display all others. Called with no arguments it displays a handy small ASCII
|
| 99 | chart.")
|
| 100 | (license license:bsd-2)))
|
| 101 |
|
| 102 | (define-public boxes
|
| 103 | (package
|
| 104 | (name "boxes")
|
| 105 | (version "2.1.1")
|
| 106 | (source (origin
|
| 107 | (method git-fetch)
|
| 108 | (uri (git-reference
|
| 109 | (url "https://github.com/ascii-boxes/boxes")
|
| 110 | (commit (string-append "v" version))))
|
| 111 | (file-name (git-file-name name version))
|
| 112 | (sha256
|
| 113 | (base32
|
| 114 | "1bf5rnfiw04ffs1l17zhbg4wvq2vfn2qbz1xmd250xqj15lysw88"))))
|
| 115 | (build-system gnu-build-system)
|
| 116 | (arguments
|
| 117 | `(#:test-target "test"
|
| 118 | #:make-flags (list (string-append "GLOBALCONF="
|
| 119 | (assoc-ref %outputs "out")
|
| 120 | "/etc/boxes-config"))
|
| 121 | #:modules
|
| 122 | ((ice-9 match)
|
| 123 | ,@%gnu-build-system-modules)
|
| 124 | #:phases
|
| 125 | (modify-phases %standard-phases
|
| 126 | (delete 'configure)
|
| 127 | (replace 'install
|
| 128 | (lambda* (#:key outputs #:allow-other-keys)
|
| 129 | (let ((out (assoc-ref outputs "out")))
|
| 130 | (for-each (match-lambda
|
| 131 | ((source target)
|
| 132 | (install-file source
|
| 133 | (string-append out "/" target))))
|
| 134 | '(("out/boxes" "bin/")
|
| 135 | ("doc/boxes.1" "share/man/man1/")
|
| 136 | ("boxes-config" "etc/")))))))))
|
| 137 | (native-inputs
|
| 138 | (list bison flex
|
| 139 | |
| 140 | xxd))
|
| 141 | (inputs
|
| 142 | (list libunistring pcre2))
|
| 143 | (home-page "https://boxes.thomasjensen.com")
|
| 144 | (synopsis "Command line ASCII boxes")
|
| 145 | (description
|
| 146 | "This command-line filter program draws ASCII-art boxes around your input
|
| 147 | text.")
|
| 148 | (license license:gpl2)))
|
| 149 |
|
| 150 | (define-public zsh-autopair
|
| 151 | (package
|
| 152 | (name "zsh-autopair")
|
| 153 | (version "1.0")
|
| 154 | (home-page "https://github.com/hlissner/zsh-autopair")
|
| 155 | (source (origin
|
| 156 | (method git-fetch)
|
| 157 | (uri (git-reference
|
| 158 | (url "https://github.com/hlissner/zsh-autopair.git")
|
| 159 | (commit (string-append "v" version))))
|
| 160 | (file-name (git-file-name name version))
|
| 161 | (sha256
|
| 162 | (base32
|
| 163 | "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"))))
|
| 164 | (build-system copy-build-system)
|
| 165 | (arguments
|
| 166 | '(#:install-plan '(("autopair.zsh"
|
| 167 | "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh"))))
|
| 168 | (synopsis "Auto-close and delete matching delimiters in Zsh")
|
| 169 | (description
|
| 170 | "This Zsh plugin auto-closes, deletes, and skips over matching delimiters
|
| 171 | in Zsh intelligently.")
|
| 172 | (license license:expat)))
|
| 173 |
|
| 174 | (define-public zsh-autosuggestions
|
| 175 | (package
|
| 176 | (name "zsh-autosuggestions")
|
| 177 | (version "0.7.0")
|
| 178 | (source (origin
|
| 179 | (method git-fetch)
|
| 180 | (uri (git-reference
|
| 181 | (url "https://github.com/zsh-users/zsh-autosuggestions")
|
| 182 | (commit (string-append "v" version))))
|
| 183 | (file-name (git-file-name name version))
|
| 184 | (sha256
|
| 185 | (base32
|
| 186 | "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"))))
|
| 187 | (build-system gnu-build-system)
|
| 188 | (native-inputs
|
| 189 | (list ruby
|
| 190 | ruby-byebug
|
| 191 | ruby-pry
|
| 192 | ruby-rspec
|
| 193 | ruby-rspec-wait
|
| 194 | tmux
|
| 195 | zsh))
|
| 196 | (arguments
|
| 197 | '(#:phases
|
| 198 | (modify-phases %standard-phases
|
| 199 | (add-after 'unpack 'patch-tests
|
| 200 | (lambda _
|
| 201 | |
| 202 | (delete-file "spec/options/buffer_max_size_spec.rb")))
|
| 203 | (delete 'configure)
|
| 204 | (replace 'check |
| 205 | (lambda _
|
| 206 | (setenv "TMUX_TMPDIR" (getenv "TMPDIR"))
|
| 207 | (setenv "SHELL" (which "zsh"))
|
| 208 | (invoke "rspec")))
|
| 209 | (replace 'install
|
| 210 | (lambda* (#:key outputs #:allow-other-keys)
|
| 211 | (let* ((out (assoc-ref outputs "out"))
|
| 212 | (zsh-plugins
|
| 213 | (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
|
| 214 | (invoke "make" "all")
|
| 215 | (install-file "zsh-autosuggestions.zsh" zsh-plugins)
|
| 216 | #t))))))
|
| 217 | (home-page "https://github.com/zsh-users/zsh-autosuggestions")
|
| 218 | (synopsis "Fish-like autosuggestions for zsh")
|
| 219 | (description
|
| 220 | "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands
|
| 221 | as you type.")
|
| 222 | (license license:expat)))
|
| 223 |
|
| 224 | (define-public zsh-syntax-highlighting
|
| 225 | (package
|
| 226 | (name "zsh-syntax-highlighting")
|
| 227 | (version "0.7.1")
|
| 228 | (source (origin
|
| 229 | (method git-fetch)
|
| 230 | (uri (git-reference
|
| 231 | (url "https://github.com/zsh-users/zsh-syntax-highlighting")
|
| 232 | (commit version)))
|
| 233 | (file-name (git-file-name name version))
|
| 234 | (sha256
|
| 235 | (base32
|
| 236 | "039g3n59drk818ylcyvkciv8k9mf739cv6v4vis1h9fv9whbcmwl"))))
|
| 237 | (build-system gnu-build-system)
|
| 238 | (native-inputs
|
| 239 | (list zsh))
|
| 240 | (arguments
|
| 241 | |
| 242 | |
| 243 | `(#:tests? #f
|
| 244 | #:phases
|
| 245 | (modify-phases %standard-phases
|
| 246 | (delete 'configure)
|
| 247 | (add-after 'unpack 'patch-paths
|
| 248 | (lambda* (#:key outputs #:allow-other-keys)
|
| 249 | (let ((out (assoc-ref outputs "out")))
|
| 250 | (substitute* "Makefile"
|
| 251 | (("/usr/local") out)
|
| 252 | (("share/\\$\\(NAME\\)") "share/zsh/plugins/$(NAME)")))))
|
| 253 | (add-after 'patch-paths 'make-writable
|
| 254 | (lambda _
|
| 255 | (for-each make-file-writable
|
| 256 | '("docs/highlighters.md"
|
| 257 | "README.md"))))
|
| 258 | (add-before 'build 'add-all-md
|
| 259 | (lambda _
|
| 260 | (invoke "make" "all")))
|
| 261 | (replace 'check
|
| 262 | (lambda* (#:key tests? #:allow-other-keys)
|
| 263 | (when tests?
|
| 264 | (invoke "make" "test")
|
| 265 | (invoke "make" "perf")))))))
|
| 266 | (home-page "https://github.com/zsh-users/zsh-syntax-highlighting")
|
| 267 | (synopsis "Fish shell-like syntax highlighting for Zsh")
|
| 268 | (description
|
| 269 | "This package provides syntax highlighting for Zsh. It enables
|
| 270 | highlighting of commands whilst they are typed at a Zsh prompt into an
|
| 271 | interactive terminal. This helps in reviewing commands before running them,
|
| 272 | particularly in catching syntax errors.")
|
| 273 | (license license:bsd-3)))
|
| 274 |
|
| 275 | (define-public grml-zsh-config
|
| 276 | (package
|
| 277 | (name "grml-zsh-config")
|
| 278 | (version "0.19.3")
|
| 279 | (source (origin
|
| 280 | (method url-fetch)
|
| 281 | (uri (string-append
|
| 282 | "https://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_"
|
| 283 | version ".tar.gz"))
|
| 284 | (sha256
|
| 285 | (base32
|
| 286 | "05fri77028znjnvmh8mz3424rn8ilysj7hn8br2hk1qwkp4zzwp9"))))
|
| 287 | (build-system copy-build-system)
|
| 288 | (arguments
|
| 289 | (list
|
| 290 | #:phases
|
| 291 | #~(modify-phases
|
| 292 | %standard-phases
|
| 293 | (add-before 'install 'make-doc
|
| 294 | (lambda _ (with-directory-excursion "doc" (invoke "make")))))
|
| 295 | #:install-plan
|
| 296 | #~'(("etc/skel/.zshrc" "etc/skel/.zshrc")
|
| 297 | ("etc/zsh/keephack" "etc/zsh/keephack")
|
| 298 | ("etc/zsh/zshrc" "etc/zsh/zshrc")
|
| 299 | ("doc/grmlzshrc.5" "share/man/man5/grmlzshrc.5"))))
|
| 300 | (native-inputs (list txt2tags))
|
| 301 | (home-page "https://grml.org/zsh/")
|
| 302 | (synopsis "Grml's zsh configuration")
|
| 303 | (description "This package provides an interactive setup for zsh
|
| 304 | preconfigured by the Grml project.")
|
| 305 | (license license:gpl2)))
|
| 306 |
|
| 307 | (define-public sh-z
|
| 308 | (package
|
| 309 | (name "sh-z")
|
| 310 | (version "1.11")
|
| 311 | (source (origin
|
| 312 | (method git-fetch)
|
| 313 | (uri (git-reference
|
| 314 | (url "https://github.com/rupa/z")
|
| 315 | (commit (string-append "v" version))))
|
| 316 | (file-name (git-file-name name version))
|
| 317 | (sha256
|
| 318 | (base32
|
| 319 | "13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb"))))
|
| 320 | (build-system gnu-build-system)
|
| 321 | (arguments
|
| 322 | `(#:tests? #f |
| 323 | #:phases
|
| 324 | (modify-phases %standard-phases
|
| 325 | (delete 'configure)
|
| 326 | (delete 'build)
|
| 327 | (replace 'install
|
| 328 | (lambda* (#:key outputs #:allow-other-keys)
|
| 329 | (let* ((out (assoc-ref outputs "out"))
|
| 330 | (man (string-append out "/share/man/man1"))
|
| 331 | (bin (string-append out "/bin")))
|
| 332 | (install-file "z.sh" bin)
|
| 333 | (chmod (string-append bin "/z.sh") #o755)
|
| 334 | (install-file "z.1" man)
|
| 335 | #t))))))
|
| 336 | (synopsis "Jump about directories")
|
| 337 | (description
|
| 338 | "Tracks your most used directories, based on ``frecency''. After a short
|
| 339 | learning phase, z will take you to the most ``frecent'' directory that matches
|
| 340 | all of the regexes given on the command line in order.")
|
| 341 | (home-page "https://github.com/rupa/z")
|
| 342 | (license license:expat)))
|
| 343 |
|
| 344 | (define-public envstore
|
| 345 | (package
|
| 346 | (name "envstore")
|
| 347 | (version "2.1")
|
| 348 | (source
|
| 349 | (origin
|
| 350 | (method url-fetch)
|
| 351 | (uri (string-append "https://finalrewind.org/projects/"
|
| 352 | name "/" name "-" version ".tar.bz2"))
|
| 353 | (sha256
|
| 354 | (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
|
| 355 | (build-system gnu-build-system)
|
| 356 | (arguments
|
| 357 | `(#:test-target "test"
|
| 358 | #:make-flags (list "CC=gcc"
|
| 359 | (string-append "PREFIX=" (assoc-ref %outputs "out")))
|
| 360 | #:phases
|
| 361 | (modify-phases %standard-phases
|
| 362 | (delete 'configure))))
|
| 363 | (home-page "https://finalrewind.org/projects/envstore/")
|
| 364 | (synopsis "Save and restore environment variables")
|
| 365 | (description "Envstore is a program for sharing environment variables
|
| 366 | between various shells or commands.")
|
| 367 | (license license:wtfpl2)))
|
| 368 |
|
| 369 | (define-public trash-cli
|
| 370 | (package
|
| 371 | (name "trash-cli")
|
| 372 | (version "0.22.10.20")
|
| 373 | (source
|
| 374 | (origin
|
| 375 | (method git-fetch)
|
| 376 | (uri (git-reference
|
| 377 | (url "https://github.com/andreafrancia/trash-cli")
|
| 378 | (commit version)))
|
| 379 | (file-name (git-file-name name version))
|
| 380 | (sha256
|
| 381 | (base32
|
| 382 | "0hkn0hmwrag56g447ddqapib0s399a6b4a9wlliif6zmirxlww9n"))))
|
| 383 | (build-system python-build-system)
|
| 384 | (arguments
|
| 385 | (list #:phases
|
| 386 | #~(modify-phases %standard-phases
|
| 387 | (add-before 'build 'patch-path-constants
|
| 388 | (lambda* (#:key inputs #:allow-other-keys)
|
| 389 | (let ((libc (search-input-file inputs "lib/libc.so.6"))
|
| 390 | (df #$(file-append coreutils "/bin/df")))
|
| 391 | (substitute* "trashcli/list_mount_points.py"
|
| 392 | (("\"/lib/libc.so.6\".*")
|
| 393 | (string-append "\"" libc "\"\n"))
|
| 394 | (("\"df\"")
|
| 395 | (string-append "\"" df "\""))))))
|
| 396 | (add-before 'build 'fix-setup.py
|
| 397 | (lambda* (#:key outputs #:allow-other-keys)
|
| 398 | (let ((bin (string-append #$output "/bin")))
|
| 399 | (mkdir-p bin)
|
| 400 | (substitute* "setup.py"
|
| 401 | (("add_script\\('")
|
| 402 | (string-append "add_script('" bin "/" ))))))
|
| 403 | |
| 404 | |
| 405 | |
| 406 | (replace 'check
|
| 407 | (lambda* (#:key tests? #:allow-other-keys)
|
| 408 | (when tests?
|
| 409 | (invoke "pytest")))))))
|
| 410 | (native-inputs
|
| 411 | (list python-pytest
|
| 412 | python-parameterized
|
| 413 | python-flexmock
|
| 414 | python-mock
|
| 415 | python-six))
|
| 416 | (inputs (list coreutils))
|
| 417 | (propagated-inputs
|
| 418 | (list python-psutil))
|
| 419 | (home-page "https://github.com/andreafrancia/trash-cli")
|
| 420 | (synopsis "Trash can management tool")
|
| 421 | (description
|
| 422 | "trash-cli is a command line utility for interacting with the
|
| 423 | FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
|
| 424 | environments. It can move files to the trash, and remove or list files that
|
| 425 | are already there.")
|
| 426 | (license license:gpl2+)))
|
| 427 |
|
| 428 | (define-public direnv
|
| 429 | (package
|
| 430 | (name "direnv")
|
| 431 | (version "2.32.1")
|
| 432 | (source
|
| 433 | (origin (method git-fetch)
|
| 434 | (uri (git-reference
|
| 435 | (url "https://github.com/direnv/direnv")
|
| 436 | (commit (string-append "v" version))))
|
| 437 | (file-name (git-file-name name version))
|
| 438 | (sha256
|
| 439 | (base32
|
| 440 | "1i473j7j4sx8p83zqlnakskqk0jyd3byajp7jmv2gym9s4k841y7"))))
|
| 441 | (build-system go-build-system)
|
| 442 | (arguments
|
| 443 | '(#:import-path "github.com/direnv/direnv"
|
| 444 | #:phases
|
| 445 | (modify-phases %standard-phases
|
| 446 | (add-after 'install 'install-manpages
|
| 447 | (lambda* (#:key outputs #:allow-other-keys)
|
| 448 | (let* ((out (assoc-ref outputs "out"))
|
| 449 | (man (string-append out "/share/man/man1")))
|
| 450 | (mkdir-p man)
|
| 451 | (with-directory-excursion "src/github.com/direnv/direnv"
|
| 452 | (install-file "man/direnv.1" man)
|
| 453 | (install-file "man/direnv-stdlib.1" man)
|
| 454 | (install-file "man/direnv.toml.1" man)))))
|
| 455 | (replace 'check
|
| 456 | (lambda* (#:key tests? #:allow-other-keys)
|
| 457 | (when tests?
|
| 458 | (setenv "HOME" "/tmp")
|
| 459 | (with-directory-excursion "src/github.com/direnv/direnv"
|
| 460 | |
| 461 | |
| 462 | (make-file-writable "test/scenarios/base/.envrc")
|
| 463 | |
| 464 | |
| 465 | (invoke "go" "test" "./...")
|
| 466 | |
| 467 | |
| 468 | (invoke "make" "clean"))))))))
|
| 469 | (native-inputs
|
| 470 | (list go-github-com-burntsushi-toml go-github-com-direnv-go-dotenv
|
| 471 | go-github-com-mattn-go-isatty go-golang-org-x-mod which))
|
| 472 | (home-page "https://direnv.net/")
|
| 473 | (synopsis "Environment switcher for the shell")
|
| 474 | (description
|
| 475 | "direnv can hook into the bash, zsh, tcsh, and fish shells to load
|
| 476 | or unload environment variables depending on the current directory. This
|
| 477 | allows project-specific environment variables without using @file{~/.profile}.
|
| 478 |
|
| 479 | Before each prompt, direnv checks for the existence of a @file{.envrc} file in
|
| 480 | the current and parent directories. This file is then used to alter the
|
| 481 | environment variables of the current shell.")
|
| 482 | (license license:expat)))
|
| 483 |
|
| 484 | (define-public fzy
|
| 485 | (package
|
| 486 | (name "fzy")
|
| 487 | (version "1.0")
|
| 488 | (source
|
| 489 | (origin
|
| 490 | (method git-fetch)
|
| 491 | (uri (git-reference
|
| 492 | (url "https://github.com/jhawthorn/fzy")
|
| 493 | (commit version)))
|
| 494 | (file-name (git-file-name name version))
|
| 495 | (sha256
|
| 496 | (base32
|
| 497 | "1gkzdvj73f71388jvym47075l9zw61v6l8wdv2lnc0mns6dxig0k"))))
|
| 498 | (build-system gnu-build-system)
|
| 499 | (arguments
|
| 500 | '(#:make-flags (list "CC=gcc"
|
| 501 | (string-append "PREFIX=" (assoc-ref %outputs "out")))
|
| 502 | #:phases
|
| 503 | (modify-phases %standard-phases
|
| 504 | (delete 'configure))))
|
| 505 | (home-page "https://github.com/jhawthorn/fzy")
|
| 506 | (synopsis "Fast fuzzy text selector for the terminal with an advanced
|
| 507 | scoring algorithm")
|
| 508 | (description
|
| 509 | "Most other fuzzy matchers sort based on the length of a match. fzy tries
|
| 510 | to find the result the user intended. It does this by favouring matches on
|
| 511 | consecutive letters and starts of words. This allows matching using acronyms
|
| 512 | or different parts of the path.
|
| 513 |
|
| 514 | fzy is designed to be used both as an editor plugin and on the command
|
| 515 | line. Rather than clearing the screen, fzy displays its interface directly
|
| 516 | below the current cursor position, scrolling the screen if necessary.")
|
| 517 | (license license:expat)))
|
| 518 |
|
| 519 | (define-public hstr
|
| 520 | (package
|
| 521 | (name "hstr")
|
| 522 | (version "2.5")
|
| 523 | (source (origin
|
| 524 | (method git-fetch)
|
| 525 | (uri (git-reference
|
| 526 | (url "https://github.com/dvorka/hstr")
|
| 527 | (commit version)))
|
| 528 | (file-name (git-file-name name version))
|
| 529 | (sha256
|
| 530 | (base32
|
| 531 | "0xg10jyiq12bcygi6aa9qq9pki7bipdsvsza037p2iqix19jg0x8"))))
|
| 532 | (build-system gnu-build-system)
|
| 533 | (arguments
|
| 534 | `(#:phases
|
| 535 | (modify-phases %standard-phases
|
| 536 | (add-before 'build 'adjust-ncurses-includes
|
| 537 | (lambda* (#:key make-flags outputs #:allow-other-keys)
|
| 538 | (let ((out (assoc-ref outputs "out")))
|
| 539 | (substitute* "src/include/hstr_curses.h"
|
| 540 | (("ncursesw\\/curses.h") "ncurses.h"))
|
| 541 | (substitute* "src/include/hstr.h"
|
| 542 | (("ncursesw\\/curses.h") "ncurses.h")))
|
| 543 | #t)))))
|
| 544 | (native-inputs
|
| 545 | (list autoconf automake pkg-config))
|
| 546 | (inputs
|
| 547 | (list ncurses readline))
|
| 548 | (synopsis "Navigate and search command history with shell history suggest box")
|
| 549 | (description "HSTR (HiSToRy) is a command-line utility that brings
|
| 550 | improved Bash and Zsh command completion from the history. It aims to make
|
| 551 | completion easier and more efficient than with @kbd{Ctrl-R}. It allows you to
|
| 552 | easily view, navigate, and search your command history with suggestion boxes.
|
| 553 | HSTR can also manage your command history (for instance you can remove
|
| 554 | commands that are obsolete or contain a piece of sensitive information) or
|
| 555 | bookmark your favourite commands.")
|
| 556 | (home-page "http://me.mindforger.com/projects/hh.html")
|
| 557 | (license license:asl2.0)))
|
| 558 |
|
| 559 | (define-public shell-functools
|
| 560 | (package
|
| 561 | (name "shell-functools")
|
| 562 | (version "0.3.0")
|
| 563 | (source (origin
|
| 564 | (method git-fetch)
|
| 565 | (uri (git-reference
|
| 566 | (url "https://github.com/sharkdp/shell-functools")
|
| 567 | (commit (string-append "v" version))))
|
| 568 | (file-name (git-file-name name version))
|
| 569 | (sha256
|
| 570 | (base32
|
| 571 | "0d6zzg7cxfrzwzh1wmpj7q85kz33sak6ac59ncsm6dlbin12h0hi"))))
|
| 572 | (build-system python-build-system)
|
| 573 | (home-page "https://github.com/sharkdp/shell-functools/")
|
| 574 | (synopsis "Functional programming tools for the shell")
|
| 575 | (description "This package provides higher order functions like map,
|
| 576 | filter, foldl, sort_by and take_while as simple command-line tools. Following
|
| 577 | the UNIX philosophy, these commands are designed to be composed via pipes. A
|
| 578 | large collection of functions such as basename, replace, contains or is_dir
|
| 579 | are provided as arguments to these commands.")
|
| 580 | (license license:expat)))
|
| 581 |
|
| 582 | (define-public rig
|
| 583 | (package
|
| 584 | (name "rig")
|
| 585 | (version "1.11")
|
| 586 | (source (origin
|
| 587 | (method url-fetch)
|
| 588 | (uri (string-append "mirror://sourceforge/rig/rig/"
|
| 589 | version "/rig-"
|
| 590 | version ".tar.gz"))
|
| 591 | (sha256
|
| 592 | (base32
|
| 593 | "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0"))))
|
| 594 | (build-system gnu-build-system)
|
| 595 | (arguments `(#:make-flags
|
| 596 | (list (string-append "CXX=" ,(cxx-for-target))
|
| 597 | (string-append "PREFIX=" %output))
|
| 598 | #:phases
|
| 599 | (modify-phases %standard-phases
|
| 600 | (delete 'configure)
|
| 601 | (add-after 'unpack 'fix-build
|
| 602 | (lambda _
|
| 603 | (substitute* "rig.cc"
|
| 604 | (("^#include <string>")
|
| 605 | "#include <cstring>"))
|
| 606 | (substitute* "Makefile"
|
| 607 | (("g\\+\\+")
|
| 608 | "${CXX} -O2")
|
| 609 | (("install -g 0 -m 755 -o 0 -s rig \\$\\(BINDIR\\)")
|
| 610 | "install -m 755 -d $(DESTDIR)$(BINDIR)\n\t\
|
| 611 | install -m 755 rig $(DESTDIR)$(BINDIR)/rig")
|
| 612 | (("install -g 0 -m 644 -o 0 rig.6 \\$\\(MANDIR\\)/man6/rig.6")
|
| 613 | "install -m 755 -d $(DESTDIR)$(MANDIR)/man6/\n\t\
|
| 614 | install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6")
|
| 615 | (("install -g 0 -m 755 -o 0 -d \\$\\(DATADIR\\)")
|
| 616 | "install -m 755 -d $(DESTDIR)$(DATADIR)")
|
| 617 | (("install -g 0 -m 644 -o 0 data/\\*.idx \\$\\(DATADIR\\)")
|
| 618 | "install -m 644 data/*.idx $(DESTDIR)$(DATADIR)")))))
|
| 619 | #:tests? #f))
|
| 620 | (home-page "http://rig.sourceforge.net")
|
| 621 | (synopsis "Random identity generator")
|
| 622 | (description
|
| 623 | "RIG (Random Identity Generator) generates random, yet real-looking,
|
| 624 | personal data. It is useful if you need to feed a name to a Web site, BBS, or
|
| 625 | real person, and are too lazy to think of one yourself. Also, if the Web
|
| 626 | site/BBS/person you are giving the information to tries to cross-check the
|
| 627 | city, state, zip, or area code, it will check out.")
|
| 628 | (license license:gpl2+)))
|
| 629 |
|
| 630 | (define-public conflict
|
| 631 | (package
|
| 632 | (name "conflict")
|
| 633 | (version "20210108")
|
| 634 | (source (origin
|
| 635 | (method url-fetch)
|
| 636 | (uri (string-append
|
| 637 | "https://invisible-mirror.net/archives/conflict/conflict-"
|
| 638 | version ".tgz"))
|
| 639 | (sha256
|
| 640 | (base32
|
| 641 | "0mls4climvp7v9hnc3zh01mh270kqcj797ng0xslwb027lipis4h"))))
|
| 642 | (build-system gnu-build-system)
|
| 643 | (arguments
|
| 644 | `(#:phases
|
| 645 | (modify-phases %standard-phases
|
| 646 | (add-after 'unpack 'fix-paths
|
| 647 | (lambda _
|
| 648 | (substitute* "run_test.sh"
|
| 649 | (("PATH=\".:\\$BIN:/bin\"")
|
| 650 | "PATH=\".:$BIN:$PATH\"")))))))
|
| 651 | (home-page "https://invisible-island.net/conflict/conflict.html")
|
| 652 | (synopsis "Displays conflicting filenames in your execution path")
|
| 653 | (description
|
| 654 | "@code{conflict} examines the user-specifiable list of programs, looking
|
| 655 | for instances in the user's path which conflict (i.e., the name appears in
|
| 656 | more than one point in the path).")
|
| 657 | (license (license:x11-style "file://COPYING"))))
|
| 658 |
|
| 659 | (define-public renameutils
|
| 660 | (package
|
| 661 | (name "renameutils")
|
| 662 | (version "0.12.0")
|
| 663 | (source
|
| 664 | (origin
|
| 665 | (method url-fetch)
|
| 666 | (uri (string-append "mirror://savannah/renameutils/"
|
| 667 | "renameutils-" version ".tar.gz"))
|
| 668 | (sha256
|
| 669 | (base32
|
| 670 | "18xlkr56jdyajjihcmfqlyyanzyiqqlzbhrm6695mkvw081g1lnb"))
|
| 671 | (modules '((guix build utils)))
|
| 672 | (snippet '(begin
|
| 673 | (substitute* "src/Makefile.in"
|
| 674 | (("\\(\\$bindir\\)") "$(bindir)"))
|
| 675 | #t))))
|
| 676 | (build-system gnu-build-system)
|
| 677 | (inputs
|
| 678 | (list readline))
|
| 679 | (home-page "https://www.nongnu.org/renameutils/")
|
| 680 | (synopsis "File renaming utilities")
|
| 681 | (description "The file renaming utilities (renameutils for short) are a
|
| 682 | set of programs designed to make renaming of files faster and less cumbersome.
|
| 683 | The file renaming utilities consists of five programs: @command{qmv},
|
| 684 | @command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.")
|
| 685 | (license license:gpl3+)))
|
| 686 |
|
| 687 | (define-public grc
|
| 688 | (package
|
| 689 | (name "grc")
|
| 690 | (version "1.13")
|
| 691 | (source
|
| 692 | (origin
|
| 693 | (method git-fetch)
|
| 694 | (uri (git-reference
|
| 695 | (url "https://github.com/garabik/grc")
|
| 696 | (commit (string-append "v" version))))
|
| 697 | (file-name (git-file-name name version))
|
| 698 | (sha256
|
| 699 | (base32 "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl"))))
|
| 700 | (build-system gnu-build-system)
|
| 701 | (inputs
|
| 702 | (list python))
|
| 703 | (arguments
|
| 704 | (list
|
| 705 | #:phases
|
| 706 | #~(modify-phases %standard-phases
|
| 707 | (delete 'configure)
|
| 708 | (replace 'build
|
| 709 | (lambda _
|
| 710 | (substitute* "grc"
|
| 711 | (("conffilenames = \\[.*\\]")
|
| 712 | (string-append
|
| 713 | "conffilenames = ["
|
| 714 | "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
|
| 715 | "+ '/etc/grc.conf']")))
|
| 716 | (substitute* "grcat"
|
| 717 | (("conffilepath \\+= \\['/usr/.*\\]")
|
| 718 | (string-append
|
| 719 | "conffilepath += ["
|
| 720 | "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
|
| 721 | "+ '/share/grc/']"))))) |
| 722 | (delete 'check)
|
| 723 | (replace 'install
|
| 724 | (lambda _
|
| 725 | (invoke "sh" "install.sh" #$output #$output))))))
|
| 726 | (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html")
|
| 727 | (synopsis "Generic colouriser for everything")
|
| 728 | (description "@code{grc} can be used to colourise logfiles, output of
|
| 729 | shell commands, arbitrary text, etc. Many shell commands are supported out of
|
| 730 | the box.
|
| 731 |
|
| 732 | You might want to add these lines you your @code{~/.bashrc}:
|
| 733 | @example
|
| 734 | GRC_ALIASES=true
|
| 735 | source ${GUIX_ENVIRONMENT:-$HOME/.guix-profile}/etc/profile.d/grc.sh
|
| 736 | @end example
|
| 737 | ")
|
| 738 | (license license:gpl2)))
|