2023-11-16 04:20:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, makeWrapper
|
|
|
|
, ffmpeg
|
|
|
|
, pandoc
|
|
|
|
, poppler_utils
|
|
|
|
, ripgrep
|
|
|
|
, Security
|
|
|
|
, zip
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
let
|
|
|
|
path = [
|
|
|
|
ffmpeg
|
|
|
|
pandoc
|
|
|
|
poppler_utils
|
|
|
|
ripgrep
|
|
|
|
zip
|
|
|
|
];
|
|
|
|
in rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ripgrep-all";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.10.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phiresky";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "ripgrep-all";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-ns7RL7kiG72r07LkF6RzShNg8M2SU6tU5+gXDxzUQHM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-01-25 14:12:00 +00:00
|
|
|
"tokio-tar-0.3.1" = "sha256-oYXcZepnQyZ13zCvECwNqbXUnov3Y6uJlpkHz1zVpRo=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper poppler_utils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeCheckInputs = path;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/rga \
|
2024-01-25 14:12:00 +00:00
|
|
|
--prefix PATH ":" "${lib.makeBinPath path}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/phiresky/ripgrep-all/blob/${src.rev}/CHANGELOG.md";
|
2020-04-24 23:36:52 +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.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/phiresky/ripgrep-all";
|
|
|
|
license = with licenses; [ agpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ zaninime ma27 ];
|
2021-05-03 20:48:10 +00:00
|
|
|
mainProgram = "rga";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|