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