depot/third_party/nixpkgs/pkgs/tools/misc/pistol/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

47 lines
996 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, file
, installShellFiles
, asciidoctor
}:
buildGoModule rec {
pname = "pistol";
version = "0.5.2";
src = fetchFromGitHub {
owner = "doronbehar";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/w2BenBIzhD0KHtELlFy7YGv0lykHrjrROZeW75gHis=";
};
vendorHash = "sha256-+Q72DUKLqahgbLCaXOTAYZaMvNfv3XF+SpyqHyB065g=";
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 ];
mainProgram = "pistol";
};
}