summaryrefslogtreecommitdiff
path: root/gnu/packages/rust-apps.scm
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2025-06-20 15:46:20 +0200
committerHilton Chain <hako@ultrarare.space>2025-09-05 18:07:30 +0800
commit445c23889ecddbb3103d17c6553e356d5eaf3e37 (patch)
tree51880ad7e81f7bcde65e8fc436a855f93f3bd898 /gnu/packages/rust-apps.scm
parent17ae4546b61c0170af8283cea1656572f08b8ac7 (diff)
gnu: Add ripgrep-all.
* gnu/packages/rust-apps.scm (ripgrep-all): New variable. Change-Id: Ie05f8dc3352b52a7dcb5bcde9cb33ec7e9fc5d56 Signed-off-by: Hilton Chain <hako@ultrarare.space> Modified-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/rust-apps.scm')
-rw-r--r--gnu/packages/rust-apps.scm68
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index cfb0ff09e47..ef4ee37200c 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -102,6 +102,7 @@
#:use-module (gnu packages shells)
#:use-module (gnu packages ssh)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages protobuf)
@@ -112,11 +113,13 @@
#:use-module (gnu packages ruby-xyz)
#:use-module (gnu packages rust)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages terminals)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages tree-sitter)
#:use-module (gnu packages version-control)
#:use-module (gnu packages webkit)
+ #:use-module (gnu packages video)
#:use-module (gnu packages xorg))
(define-public aardvark-dns
@@ -2093,6 +2096,71 @@ respecting your gitignore rules. @code{ripgrep} is similar to other popular
search tools like The Silver Searcher, @command{ack} and @command{grep}.")
(license (list license:unlicense license:expat))))
+(define-public ripgrep-all
+ (package
+ (name "ripgrep-all")
+ (version "0.10.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/phiresky/ripgrep-all")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1cks8b9z8fl1rs2xgklgsis79w9bylfmxxvns2adwsiilkpsxzxg"))))
+ (build-system cargo-build-system)
+ (arguments
+ (list
+ #:install-source? #f
+ #:modules
+ '((srfi srfi-26)
+ (guix build utils)
+ (guix build cargo-build-system))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-with-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each
+ (lambda (bin)
+ (wrap-program bin
+ `("PATH" ":" prefix
+ (,(string-join
+ (map (compose dirname
+ (cut search-input-file inputs <>))
+ '("bin/ffmpeg"
+ "bin/fzf"
+ "bin/pandoc"
+ "bin/pdfinfo"
+ "bin/rg"
+ "bin/zip"))
+ ":")))))
+ (find-files (string-append #$output "/bin"))))))))
+ (native-inputs
+ (list pkg-config xz))
+ (inputs
+ (cons* ffmpeg
+ fzf
+ pandoc
+ poppler
+ ripgrep
+ sqlite
+ zip
+ `(,zstd "lib")
+ (cargo-inputs 'ripgrep-all)))
+ (home-page "https://github.com/phiresky/ripgrep-all")
+ (synopsis "Line-oriented search tool for text and binary formats")
+ (description
+ "@command{rga} is a line-oriented search tool for searching in both text
+and binary formats. It is a wrapper for @code{ripgrep} with adapters for common
+binary formats, enabling it to search in multitude of file types: pdf, docx,
+sqlite, jpg, movie subtitles (mkv, mp4), etc.
+
+This package also supports adding custom adapters in its configuration file,
+matching for mime types or extensions and executing arbitrary executables for
+the parsing.")
+ (license license:agpl3+)))
+
(define-public rot8
(package
(name "rot8")