Merge pull request #223401 from caarlos0/goreleaser-man-cmp
goreleaser: install completions and manpages
This commit is contained in:
commit
e129f623a5
1 changed files with 30 additions and 8 deletions
|
@ -1,4 +1,10 @@
|
||||||
{ lib, buildGoModule, fetchFromGitHub }:
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
|
, buildPackages
|
||||||
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "goreleaser";
|
pname = "goreleaser";
|
||||||
|
@ -13,20 +19,36 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = "sha256-eVuEyQCO2/gufMJp8eUpC82wdJbbJsMKR1ZGv96C9mI=";
|
vendorHash = "sha256-eVuEyQCO2/gufMJp8eUpC82wdJbbJsMKR1ZGv96C9mI=";
|
||||||
|
|
||||||
ldflags = [
|
ldflags =
|
||||||
"-s"
|
[ "-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs" ];
|
||||||
"-w"
|
|
||||||
"-X main.version=${version}"
|
|
||||||
"-X main.builtBy=nixpkgs"
|
|
||||||
];
|
|
||||||
|
|
||||||
# tests expect the source files to be a build repo
|
# tests expect the source files to be a build repo
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
let emulator = stdenv.hostPlatform.emulator buildPackages;
|
||||||
|
in ''
|
||||||
|
${emulator} $out/bin/goreleaser man > goreleaser.1
|
||||||
|
installManPage ./goreleaser.1
|
||||||
|
installShellCompletion --cmd goreleaser \
|
||||||
|
--bash <(${emulator} $out/bin/goreleaser completion bash) \
|
||||||
|
--fish <(${emulator} $out/bin/goreleaser completion fish) \
|
||||||
|
--zsh <(${emulator} $out/bin/goreleaser completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Deliver Go binaries as fast and easily as possible";
|
description = "Deliver Go binaries as fast and easily as possible";
|
||||||
homepage = "https://goreleaser.com";
|
homepage = "https://goreleaser.com";
|
||||||
maintainers = with maintainers; [ c0deaddict endocrimes sarcasticadmin techknowlogick developer-guy caarlos0 ];
|
maintainers = with maintainers; [
|
||||||
|
c0deaddict
|
||||||
|
endocrimes
|
||||||
|
sarcasticadmin
|
||||||
|
techknowlogick
|
||||||
|
developer-guy
|
||||||
|
caarlos0
|
||||||
|
];
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue