11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
16 owner = "acheronfail";
19 hash = "sha256-6ba7EJUts0Ni9EA3ENlK+a2FaPo7JohtCyqwR9DdL1E=";
22 cargoHash = "sha256-XEjKTZ3qaiLWbm2wF+V97u9tGXDq/oTm249ubUE9n94=";
31 wrapProgram $out/bin/rgr \
32 --prefix PATH : ${lib.makeBinPath [ ripgrep ]}
34 pushd "$(dirname "$(find -path '**/repgrep-stamp' | head -n 1)")"
37 '' + lib.optionalString (stdenv.hostPlatform.canExecute stdenv.buildPlatform) ''
38 # As it can be seen here: https://github.com/acheronfail/repgrep/blob/0.15.0/.github/workflows/release.yml#L206, the completions are just the same as ripgrep
39 installShellCompletion --cmd rgr \
40 --bash <(${lib.getExe ripgrep} --generate complete-bash | sed 's/-c rg/-c rgr/') \
41 --zsh <(${lib.getExe ripgrep} --generate complete-zsh | sed 's/-c rg/-c rgr/') \
42 --fish <(${lib.getExe ripgrep} --generate complete-fish | sed 's/-c rg/-c rgr/')
46 description = "Interactive replacer for ripgrep that makes it easy to find and replace across files on the command line";
47 homepage = "https://github.com/acheronfail/repgrep";
48 changelog = "https://github.com/acheronfail/repgrep/blob/${src.rev}/CHANGELOG.md";
49 license = with licenses; [ mit asl20 unlicense ];
50 maintainers = with maintainers; [ figsoda ];