nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 makeWrapper,
6 ffmpeg,
7 pandoc,
8 poppler-utils,
9 ripgrep,
10 zip,
11 fzf,
12}:
13
14let
15 path = [
16 ffmpeg
17 pandoc
18 poppler-utils
19 ripgrep
20 zip
21 fzf
22 ];
23in
24rustPlatform.buildRustPackage rec {
25 pname = "ripgrep-all";
26 version = "0.10.9";
27
28 src = fetchFromGitHub {
29 owner = "phiresky";
30 repo = "ripgrep-all";
31 rev = "v${version}";
32 hash = "sha256-r/+u76Qxat6U0Hb3Xh31K/F0dNSPzteFzoE69NNCerI=";
33 };
34
35 cargoHash = "sha256-nTCqqTFt87snzOXkjablaX9ZMGu/s88ZnUVr5uYrzPs=";
36
37 # override debug=true set in Cargo.toml upstream
38 RUSTFLAGS = "-C debuginfo=none";
39
40 nativeBuildInputs = [
41 makeWrapper
42 poppler-utils
43 ];
44
45 nativeCheckInputs = path;
46
47 postInstall = ''
48 for bin in $out/bin/*; do
49 wrapProgram $bin \
50 --prefix PATH ":" "${lib.makeBinPath path}"
51 done
52 '';
53
54 meta = with lib; {
55 changelog = "https://github.com/phiresky/ripgrep-all/blob/${src.rev}/CHANGELOG.md";
56 description = "Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, and more";
57 longDescription = ''
58 Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
59
60 rga is a line-oriented search tool that allows you to look for a regex in
61 a multitude of file types. rga wraps the awesome ripgrep and enables it
62 to search in pdf, docx, sqlite, jpg, movie subtitles (mkv, mp4), etc.
63 '';
64 homepage = "https://github.com/phiresky/ripgrep-all";
65 license = with licenses; [ agpl3Plus ];
66 maintainers = with maintainers; [
67 zaninime
68 ma27
69 ];
70 mainProgram = "rga";
71 };
72}