clusterctl: init at 1.0.1

This commit is contained in:
zowoq 2021-11-13 08:14:17 +10:00
parent 3db690fe70
commit cd8f237c0c
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "clusterctl";
version = "1.0.1";
src = fetchFromGitHub {
owner = "kubernetes-sigs";
repo = "cluster-api";
rev = "v${version}";
sha256 = "sha256-EkBZZUkr1u0u75WDDFAdLLpS01+3+eyXpu4HRg2Q780=";
};
vendorSha256 = "sha256-VO1Z4NUWrd4JuFYFg0a01psqoIM8ps3vKd0djR5OELU=";
subPackages = [ "cmd/clusterctl" ];
nativeBuildInputs = [ installShellFiles ];
ldflags = let t = "sigs.k8s.io/cluster-api/version"; in [
"-X ${t}.gitMajor=${lib.versions.major version}"
"-X ${t}.gitMinor=${lib.versions.minor version}"
"-X ${t}.gitVersion=v${version}"
];
postInstall = ''
# errors attempting to write config to read-only $HOME
export HOME=$(mktemp -d)
installShellCompletion --cmd clusterctl \
--bash <($out/bin/clusterctl completion bash) \
--zsh <($out/bin/clusterctl completion zsh)
'';
meta = with lib; {
description = "Kubernetes cluster API tool";
homepage = "https://cluster-api.sigs.k8s.io/";
license = licenses.asl20;
maintainers = with maintainers; [ zowoq ];
};
}

View file

@ -2459,6 +2459,8 @@ with pkgs;
clprover = callPackage ../applications/science/logic/clprover/clprover.nix { };
clusterctl = callPackage ../applications/networking/cluster/clusterctl { };
coloredlogs = with python3Packages; toPythonApplication coloredlogs;
colord-kde = libsForQt5.callPackage ../tools/misc/colord-kde {};