2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-02-13 12:27:42 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, file
|
2021-05-16 06:52:53 +00:00
|
|
|
, installShellFiles
|
|
|
|
, asciidoctor
|
2020-02-13 12:27:42 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pistol";
|
2021-12-08 00:40:23 +00:00
|
|
|
version = "0.3.2";
|
2020-02-13 12:27:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "doronbehar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-08 00:40:23 +00:00
|
|
|
sha256 = "sha256-DGbWlEDI/qGNpdT8N79RsLxnUm4Sw8lHFRIBFd1GmK0=";
|
2020-02-13 12:27:42 +00:00
|
|
|
};
|
|
|
|
|
2021-11-29 10:21:21 +00:00
|
|
|
vendorSha256 = "sha256-poTd0lXRaJeDxwcw+h76NPC0mFB9nwm2vLLB5UUK1dk=";
|
2020-02-13 12:27:42 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-02-13 12:27:42 +00:00
|
|
|
subPackages = [ "cmd/pistol" ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
file
|
|
|
|
];
|
2021-05-16 06:52:53 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
asciidoctor
|
|
|
|
];
|
|
|
|
postBuild = ''
|
|
|
|
asciidoctor -b manpage -d manpage README.adoc
|
|
|
|
installManPage pistol.1
|
|
|
|
'';
|
2020-02-13 12:27:42 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
2020-07-18 09:20:00 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-13 12:27:42 +00:00
|
|
|
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 ];
|
|
|
|
};
|
2020-07-18 09:20:00 +00:00
|
|
|
}
|