nixpkgs/pkgs/tools/text/ripgrep-all/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

81 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
makeWrapper,
ffmpeg,
pandoc,
poppler_utils,
ripgrep,
Security,
zip,
fzf,
}:
let
path = [
ffmpeg
pandoc
poppler_utils
ripgrep
zip
fzf
];
in
rustPlatform.buildRustPackage rec {
pname = "ripgrep-all";
version = "0.10.6";
src = fetchFromGitHub {
owner = "phiresky";
repo = "ripgrep-all";
rev = "v${version}";
hash = "sha256-ns7RL7kiG72r07LkF6RzShNg8M2SU6tU5+gXDxzUQHM=";
};
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
];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
nativeCheckInputs = path;
postInstall = ''
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";
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
];
mainProgram = "rga";
};
}