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