Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
71 lines
1.5 KiB
Nix
71 lines
1.5 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildGo125Module,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
buildPackages,
|
|
testers,
|
|
goreleaser,
|
|
}:
|
|
buildGo125Module rec {
|
|
pname = "goreleaser";
|
|
version = "2.12.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "goreleaser";
|
|
repo = "goreleaser";
|
|
rev = "v${version}";
|
|
hash = "sha256-EHJ1ARzk6BD5D121u+1UTe90oLOovKKD+LQWLIj81Jk=";
|
|
};
|
|
|
|
vendorHash = "sha256-J/OwvPxC8wz/91sWWUBNkW5E71m8EPjTq3h/MOxT/3k=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
"-X main.builtBy=nixpkgs"
|
|
];
|
|
|
|
subPackages = [
|
|
"."
|
|
];
|
|
|
|
# tests expect the source files to be a build repo
|
|
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)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = goreleaser;
|
|
command = "goreleaser -v";
|
|
inherit version;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Deliver Go binaries as fast and easily as possible";
|
|
homepage = "https://goreleaser.com";
|
|
maintainers = with maintainers; [
|
|
sarcasticadmin
|
|
techknowlogick
|
|
caarlos0
|
|
];
|
|
license = licenses.mit;
|
|
mainProgram = "goreleaser";
|
|
};
|
|
}
|