nixpkgs/pkgs/tools/text/vgrep/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
775 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, go-md2man, installShellFiles }:
2020-09-06 10:38:09 +01:00
buildGoModule rec {
pname = "vgrep";
2023-10-18 14:53:52 +01:00
version = "2.7.0";
2020-09-06 10:38:09 +01:00
src = fetchFromGitHub {
owner = "vrothberg";
repo = pname;
rev = "v${version}";
2023-10-18 14:53:52 +01:00
hash = "sha256-+KZNNkTuZyF02YDZX3u1KdhOcZ3+Ud6aDGL/sGUN1hI=";
2020-09-06 10:38:09 +01:00
};
vendorHash = null;
2020-09-06 10:38:09 +01:00
2021-07-31 14:44:19 +01:00
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
2020-09-06 10:38:09 +01: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;
2021-06-18 09:55:07 +01:00
maintainers = with maintainers; [ SuperSandro2000 ];
2020-09-06 10:38:09 +01:00
};
}