2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, file
|
2021-05-20 23:08:51 +00:00
|
|
|
, installShellFiles
|
|
|
|
, asciidoctor
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pistol";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "doronbehar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-umejrLdx8R//o9uQIT9JhAKJOIF5Ifpx7s3x3ejsJgo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
vendorHash = "sha256-zs7qzXvOnIiDwwNldMPB4Jkm2GWxVZnLpDzpf+ivhCc=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/pistol" ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
file
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
asciidoctor
|
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
postInstall = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
asciidoctor -b manpage -d manpage README.adoc
|
|
|
|
installManPage pistol.1
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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-08-20 17:08:02 +00:00
|
|
|
}
|