diff options
author | Andrew Wong <[email protected]> | 2025-02-20 01:43:22 -0500 |
---|---|---|
committer | Efraim Flashner <[email protected]> | 2025-02-20 11:13:01 +0200 |
commit | 65efd0c33511727987c90bebaf5c50a84e0e6182 (patch) | |
tree | a6b730b3ff9134840449c35d703bf7787f7a821a | |
parent | 1bcb7fbaec176bbaacadc5b13f9628b8794b775f (diff) |
gnu: Add sd.
* gnu/packages/rust-apps.scm (sd): New variable.
Change-Id: Ie62904c26d29bfe9fc4e09b6abf39cb8b59861c7
Signed-off-by: Efraim Flashner <[email protected]>
-rw-r--r-- | gnu/packages/rust-apps.scm | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 054a09c47d..5d4691110e 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2024 Jordan Moore <[email protected]> ;;; Copyright © 2024 normally_js <[email protected]> ;;; Copyright © 2025 Divya Ranjan Pattanaik <[email protected]> +;;; Copyright © 2025 Andrew Wong <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3860,6 +3861,63 @@ C-compatible) software.") consecutive lines and since program start.") (license license:expat))) +(define-public sd + (package + (name "sd") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "sd" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1a16p1s0j28n3vj006qm7b03k5s9mkr11cbbksvfb88wi10kqqbh")))) + (build-system cargo-build-system) + (arguments + (list + #:cargo-inputs + `(("rust-ansi-term" ,rust-ansi-term-0.12) + ("rust-clap" ,rust-clap-4) + ("rust-is-terminal" ,rust-is-terminal-0.4) + ("rust-memmap2" ,rust-memmap2-0.9) + ("rust-rayon" ,rust-rayon-1) + ("rust-regex" ,rust-regex-1) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-unescape" ,rust-unescape-0.1)) + #:cargo-development-inputs + `(("rust-ansi-to-html" ,rust-ansi-to-html-0.1) + ("rust-anyhow" ,rust-anyhow-1) + ("rust-assert-cmd" ,rust-assert-cmd-2) + ("rust-clap-mangen" ,rust-clap-mangen-0.2) + ("rust-console" ,rust-console-0.15) + ("rust-insta" ,rust-insta-1) + ("rust-proptest" ,rust-proptest-1) + ("rust-regex-automata" ,rust-regex-automata-0.4)) + #:install-source? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-extras + (lambda _ + (let ((share (string-append #$output "/share/")) + (bash-dir (string-append #$output "/etc/bash_completion.d/")) + (elvish-dir (string-append #$output "/share/elvish/lib/"))) + (install-file "gen/sd.1" (string-append share "/man/man1")) + (with-directory-excursion "gen/completions" + (install-file "_sd" (string-append share "zsh/site-functions")) + (install-file "sd.fish" + (string-append share "fish/vendor_completions.d")) + (mkdir-p bash-dir) + (mkdir-p elvish-dir) + (copy-file "sd.bash" (string-append bash-dir "sd")) + (copy-file "sd.elv" (string-append elvish-dir "sd"))))))))) + (home-page "https://github.com/chmln/sd") + (synopsis "Intuitive find & replace CLI") + (description "@code{sd} is an intuitive find & replace CLI with +JavaScript/Python-style regular expressions, a string-literal mode, and smart, +common-sense defaults.") + (license license:expat))) + (define-public skim (package (name "skim") |