nixpkgs/pkgs/tools/text/ripgrep-all/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.8 KiB
Nix
Raw Normal View History

{
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
}:
let
path = [
ffmpeg
pandoc
poppler_utils
ripgrep
zip
2024-02-20 16:35:34 +00:00
fzf
];
in
rustPlatform.buildRustPackage rec {
2019-07-31 21:08:22 +00:00
pname = "ripgrep-all";
version = "0.10.6";
2019-07-31 21:08:22 +00:00
src = fetchFromGitHub {
owner = "phiresky";
repo = "ripgrep-all";
2020-04-08 16:00:06 +00:00
rev = "v${version}";
hash = "sha256-ns7RL7kiG72r07LkF6RzShNg8M2SU6tU5+gXDxzUQHM=";
2019-07-31 21:08:22 +00:00
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tokio-tar-0.3.1" = "sha256-oYXcZepnQyZ13zCvECwNqbXUnov3Y6uJlpkHz1zVpRo=";
};
};
# override debug=true set in Cargo.toml upstream
RUSTFLAGS = "-C debuginfo=none";
nativeBuildInputs = [
makeWrapper
poppler_utils
];
2019-07-31 21:08:22 +00:00
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
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
'';
meta = with lib; {
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 ];
maintainers = with maintainers; [
zaninime
ma27
];
2021-04-27 16:49:10 +00:00
mainProgram = "rga";
2019-07-31 21:08:22 +00:00
};
}