mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
a3f6d55533
Diff: https://github.com/doronbehar/pistol/compare/v0.3.2...v0.3.3 Switch to postInstall from postBuild - See: https://discourse.nixos.org/t/cant-update-a-go-package-getting-go-inconsistent-vendoring/27063/6
47 lines
970 B
Nix
47 lines
970 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, file
|
|
, installShellFiles
|
|
, asciidoctor
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "pistol";
|
|
version = "0.3.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "doronbehar";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-6V3Du3+0YliwzsvZolapBAnyqbsv1WZhWQkaldDR+Ok=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-jURN0NSc9SFHFMS8QdaEqqBwOHnAEEJQlQXHTUDRiyE=";
|
|
|
|
doCheck = false;
|
|
|
|
subPackages = [ "cmd/pistol" ];
|
|
|
|
buildInputs = [
|
|
file
|
|
];
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
asciidoctor
|
|
];
|
|
postInstall = ''
|
|
asciidoctor -b manpage -d manpage README.adoc
|
|
installManPage pistol.1
|
|
'';
|
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|