2020-10-31 11:22:09 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, go-md2man, installShellFiles }:
|
2020-09-06 10:38:09 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "vgrep";
|
2020-10-31 11:22:09 +00:00
|
|
|
version = "2.5.0";
|
2020-09-06 10:38:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vrothberg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-10-31 11:22:09 +00:00
|
|
|
sha256 = "1waxp66286q325avvsq58s8qkfjqa39s5p8c3z59scpm0244nr80";
|
2020-09-06 10:38:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
|
|
|
|
2020-10-31 11:22:09 +00:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
sed -i '/SHELL= /d' Makefile
|
|
|
|
make docs
|
|
|
|
installManPage docs/*.[1-9]
|
|
|
|
'';
|
|
|
|
|
2020-09-06 10:38:09 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "User-friendly pager for grep/git-grep/ripgrep";
|
|
|
|
homepage = "https://github.com/vrothberg/vgrep";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ zowoq ];
|
|
|
|
};
|
|
|
|
}
|