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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
996 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";
2023-08-14 05:43:56 +00:00
version = "0.4.2";
2020-02-13 12:27:42 +00:00
src = fetchFromGitHub {
owner = "doronbehar";
repo = pname;
rev = "v${version}";
2023-08-14 05:43:56 +00:00
sha256 = "sha256-7nALrB+QubEnryVsGPpFMJ003SP2lheYTkWXF5w/V8I=";
2020-02-13 12:27:42 +00:00
};
2023-08-14 05:43:56 +00:00
vendorHash = "sha256-9Ydps8UA1f0fwG5SHRE4F61OyRJiITw/4SyoMEbsRgM=";
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
];
postInstall = ''
2021-05-16 06:52:53 +00:00
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
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 ];
2023-11-27 01:17:53 +00:00
mainProgram = "pistol";
2020-02-13 12:27:42 +00:00
};
2020-07-18 09:20:00 +00:00
}