Files
nixpkgs/pkgs/by-name/k3/k3sup/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.3 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
installShellFiles,
bash,
openssh,
}:
buildGoModule rec {
pname = "k3sup";
version = "0.13.11";
src = fetchFromGitHub {
owner = "alexellis";
repo = "k3sup";
rev = version;
sha256 = "sha256-MLGgH9Tg3lcl/nDGlGgfvgjoxjXRux79Cz6Tig0kDM4=";
};
nativeBuildInputs = [
makeWrapper
installShellFiles
];
vendorHash = null;
postConfigure = ''
substituteInPlace vendor/github.com/alexellis/go-execute/v2/exec.go \
--replace "/bin/bash" "${bash}/bin/bash"
'';
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/alexellis/k3sup/cmd.GitCommit=ref/tags/${version}"
"-X github.com/alexellis/k3sup/cmd.Version=${version}"
];
postInstall = ''
wrapProgram "$out/bin/k3sup" \
--prefix PATH : ${lib.makeBinPath [ openssh ]}
installShellCompletion --cmd k3sup \
--bash <($out/bin/k3sup completion bash) \
--zsh <($out/bin/k3sup completion zsh) \
--fish <($out/bin/k3sup completion fish)
'';
meta = with lib; {
homepage = "https://github.com/alexellis/k3sup";
description = "Bootstrap Kubernetes with k3s over SSH";
mainProgram = "k3sup";
license = licenses.mit;
maintainers = with maintainers; [
welteki
qjoly
];
};
}