mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:04:00 +00:00
555eee0a00
Diff: https://github.com/acheronfail/repgrep/compare/0.14.2...0.14.3 Changelog: https://github.com/acheronfail/repgrep/blob/0.14.3/CHANGELOG.md
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, asciidoctor
|
|
, installShellFiles
|
|
, makeWrapper
|
|
, ripgrep
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "repgrep";
|
|
version = "0.14.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "acheronfail";
|
|
repo = "repgrep";
|
|
rev = version;
|
|
hash = "sha256-33b0dZJY/lnVJGMfAg/faD6PPJIFZsvMZOmKAqCZw8k=";
|
|
};
|
|
|
|
cargoHash = "sha256-UMMTdWJ0/M8lN4abTJEVUGtoNp/g49DyW+OASg3TKfg=";
|
|
|
|
nativeBuildInputs = [
|
|
asciidoctor
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/rgr \
|
|
--prefix PATH : ${lib.makeBinPath [ ripgrep ]}
|
|
|
|
pushd "$(dirname "$(find -path '**/repgrep-stamp' | head -n 1)")"
|
|
installManPage rgr.1
|
|
installShellCompletion rgr.{bash,fish} _rgr
|
|
popd
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An interactive replacer for ripgrep that makes it easy to find and replace across files on the command line";
|
|
homepage = "https://github.com/acheronfail/repgrep";
|
|
changelog = "https://github.com/acheronfail/repgrep/blob/${src.rev}/CHANGELOG.md";
|
|
license = with licenses; [ mit asl20 unlicense ];
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "rgr";
|
|
};
|
|
}
|