diff options
Diffstat (limited to 'gnu/packages/shellutils.scm')
-rw-r--r-- | gnu/packages/shellutils.scm | 116 |
1 files changed, 108 insertions, 8 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 7a868f0789..3f9f8a27f4 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -32,6 +32,7 @@ (define-module (gnu packages shellutils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -42,6 +43,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages check) #:use-module (gnu packages flex) #:use-module (gnu packages golang) #:use-module (gnu packages libunistring) @@ -49,6 +51,7 @@ #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) #:use-module (gnu packages shells) @@ -307,19 +310,20 @@ between various shells or commands.") (define-public trash-cli (package (name "trash-cli") - (version "0.17.1.14") + (version "0.21.10.24") (source (origin - (method url-fetch) - (uri (pypi-uri "trash-cli" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/andreafrancia/trash-cli") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h")))) + "01is32lk6prwhajvlmgn3xs4fcpmiqivizcqkj9k80jx6mqjifzs")))) (build-system python-build-system) (arguments - `(#:python ,python-2 - #:tests? #f ; no tests - #:phases + `(#:phases (modify-phases %standard-phases (add-before 'build 'patch-path-constants (lambda* (#:key inputs #:allow-other-keys) @@ -329,8 +333,22 @@ between various shells or commands.") (("\"/lib/libc.so.6\".*") (string-append "\"" libc "/lib/libc.so.6\"\n")) (("\"df\"") - (string-append "\"" coreutils "/bin/df\""))))))))) + (string-append "\"" coreutils "/bin/df\"")))))) + (add-before 'build 'fix-setup.py + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (substitute* "setup.py" + (("add_script\\('") + (string-append "add_script('" bin "/" ))))))))) + (native-inputs + (list python-pytest + python-mock + python-six)) (inputs (list coreutils)) + (propagated-inputs + (list python-psutil)) (home-page "https://github.com/andreafrancia/trash-cli") (synopsis "Trash can management tool") (description @@ -543,6 +561,35 @@ site/BBS/person you are giving the information to tries to cross-check the city, state, zip, or area code, it will check out.") (license license:gpl2+))) +(define-public conflict + (package + (name "conflict") + (version "20210108") + (source (origin + (method url-fetch) + (uri (string-append + "https://invisible-mirror.net/archives/conflict/conflict-" + version ".tgz")) + (sha256 + (base32 + "0mls4climvp7v9hnc3zh01mh270kqcj797ng0xslwb027lipis4h")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda _ + (substitute* "run_test.sh" + (("PATH=\".:\\$BIN:/bin\"") + "PATH=\".:$BIN:$PATH\""))))))) + (home-page "https://invisible-island.net/conflict/conflict.html") + (synopsis "Displays conflicting filenames in your execution path") + (description + "@code{conflict} examines the user-specifiable list of programs, looking +for instances in the user's path which conflict (i.e., the name appears in +more than one point in the path).") + (license (license:x11-style "file://COPYING")))) + (define-public renameutils (package (name "renameutils") @@ -570,3 +617,56 @@ set of programs designed to make renaming of files faster and less cumbersome. The file renaming utilities consists of five programs: @command{qmv}, @command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.") (license license:gpl3+))) + +(define-public grc + (package + (name "grc") + (version "1.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/garabik/grc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl")))) + (build-system gnu-build-system) + (inputs + (list python)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (substitute* "grc" + (("conffilenames = \\[.*\\]") + (string-append + "conffilenames = [" + "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') " + "+ '/etc/grc.conf']"))) + (substitute* "grcat" + (("conffilepath \\+= \\['/usr/.*\\]") + (string-append + "conffilepath += [" + "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') " + "+ '/share/grc/']"))))) ;; trailing slash! + (delete 'check) + (replace 'install + (lambda _ + (invoke "sh" "install.sh" #$output #$output)))))) + (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html") + (synopsis "Generic colouriser for everything") + (description "@code{grc} can be used to colourise logfiles, output of +shell commands, arbitrary text, etc. Many shell commands are supported out of +the box. + +You might want to add these lines you your @code{~/.bashrc}: +@example +GRC_ALIASES=true +source ${GUIX_ENVIRONMENT:-$HOME/.guix-profile}/etc/profile.d/grc.sh +@end example +") + (license license:gpl2))) |