depot/third_party/nixpkgs/pkgs/tools/misc/pistol/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

46 lines
968 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, file
, installShellFiles
, asciidoctor
}:
buildGoModule rec {
pname = "pistol";
version = "0.4.1";
src = fetchFromGitHub {
owner = "doronbehar";
repo = pname;
rev = "v${version}";
sha256 = "sha256-umejrLdx8R//o9uQIT9JhAKJOIF5Ifpx7s3x3ejsJgo=";
};
vendorHash = "sha256-zs7qzXvOnIiDwwNldMPB4Jkm2GWxVZnLpDzpf+ivhCc=";
doCheck = false;
subPackages = [ "cmd/pistol" ];
buildInputs = [
file
];
nativeBuildInputs = [
installShellFiles
asciidoctor
];
postInstall = ''
asciidoctor -b manpage -d manpage README.adoc
installManPage pistol.1
'';
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
meta = with lib; {
description = "General purpose file previewer designed for Ranger, Lf to make scope.sh redundant";
homepage = "https://github.com/doronbehar/pistol";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
};
}