nixpkgs/pkgs/tools/misc/pistol/default.nix

47 lines
981 B
Nix
Raw Normal View History

{ 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-05-16 06:52:53 +00:00
version = "0.2.1";
2020-02-13 12:27:42 +00:00
src = fetchFromGitHub {
owner = "doronbehar";
repo = pname;
rev = "v${version}";
2021-05-16 06:52:53 +00:00
sha256 = "sha256-NUHk48P3kUx+e9BR9k9K/VaHnbZ6Do6RRf1S0974sO8=";
2020-02-13 12:27:42 +00:00
};
2021-05-08 08:52:56 +00:00
vendorSha256 = "sha256-n98cjXsgg2w3shbZPnk3g7mBbzV5Tc3jd9ZtiRk1KUM=";
2020-02-13 12:27:42 +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
2020-07-18 09:20:00 +00:00
buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ];
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
}