2023-10-30 14:12:56 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
makeWrapper,
|
|
|
|
ffmpeg,
|
|
|
|
pandoc,
|
|
|
|
poppler_utils,
|
|
|
|
ripgrep,
|
|
|
|
Security,
|
|
|
|
zip,
|
2024-02-20 16:35:34 +00:00
|
|
|
fzf,
|
2019-07-31 21:08:22 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-17 04:23:23 +00:00
|
|
|
let
|
|
|
|
path = [
|
|
|
|
ffmpeg
|
|
|
|
pandoc
|
|
|
|
poppler_utils
|
|
|
|
ripgrep
|
|
|
|
zip
|
2024-02-20 16:35:34 +00:00
|
|
|
fzf
|
2024-01-17 04:23:23 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-07-31 21:08:22 +00:00
|
|
|
pname = "ripgrep-all";
|
2024-01-17 04:23:23 +00:00
|
|
|
version = "0.10.6";
|
2019-07-31 21:08:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phiresky";
|
2024-01-17 04:23:23 +00:00
|
|
|
repo = "ripgrep-all";
|
2020-04-08 16:00:06 +00:00
|
|
|
rev = "v${version}";
|
2024-01-17 04:23:23 +00:00
|
|
|
hash = "sha256-ns7RL7kiG72r07LkF6RzShNg8M2SU6tU5+gXDxzUQHM=";
|
2019-07-31 21:08:22 +00:00
|
|
|
};
|
|
|
|
|
2023-10-30 14:12:56 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-01-17 04:23:23 +00:00
|
|
|
"tokio-tar-0.3.1" = "sha256-oYXcZepnQyZ13zCvECwNqbXUnov3Y6uJlpkHz1zVpRo=";
|
2023-10-30 14:12:56 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-10-23 19:40:14 +00:00
|
|
|
# override debug=true set in Cargo.toml upstream
|
|
|
|
RUSTFLAGS = "-C debuginfo=none";
|
|
|
|
|
2023-10-30 14:12:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
poppler_utils
|
|
|
|
];
|
2019-07-31 21:08:22 +00:00
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
|
|
|
2024-01-17 04:23:23 +00:00
|
|
|
nativeCheckInputs = path;
|
|
|
|
|
2019-07-31 21:08:22 +00:00
|
|
|
postInstall = ''
|
2024-02-20 16:35:34 +00:00
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram $bin \
|
|
|
|
--prefix PATH ":" "${lib.makeBinPath path}"
|
|
|
|
done
|
2019-12-18 14:17:59 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2024-01-17 04:23:23 +00:00
|
|
|
changelog = "https://github.com/phiresky/ripgrep-all/blob/${src.rev}/CHANGELOG.md";
|
2019-07-31 21:08:22 +00:00
|
|
|
description = "Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, and more";
|
|
|
|
longDescription = ''
|
|
|
|
Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
|
|
|
|
|
|
|
|
rga is a line-oriented search tool that allows you to look for a regex in
|
|
|
|
a multitude of file types. rga wraps the awesome ripgrep and enables it
|
|
|
|
to search in pdf, docx, sqlite, jpg, movie subtitles (mkv, mp4), etc.
|
|
|
|
'';
|
2020-04-08 16:00:06 +00:00
|
|
|
homepage = "https://github.com/phiresky/ripgrep-all";
|
2019-07-31 21:08:22 +00:00
|
|
|
license = with licenses; [ agpl3Plus ];
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
zaninime
|
|
|
|
ma27
|
|
|
|
];
|
2021-04-27 16:49:10 +00:00
|
|
|
mainProgram = "rga";
|
2019-07-31 21:08:22 +00:00
|
|
|
};
|
|
|
|
}
|