nixpkgs/pkgs/applications/networking/cluster/kubelogin-oidc/default.nix
2023-07-02 15:42:08 +00:00

31 lines
791 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "kubelogin";
version = "1.28.0";
src = fetchFromGitHub {
owner = "int128";
repo = pname;
rev = "v${version}";
sha256 = "sha256-8atEUJLXSbLHdxo1wKtAHAFrZkQYWdW6tP2oKoxahXA=";
};
subPackages = ["."];
vendorHash = "sha256-rLpXBFNBJG3H0+2inCG4wN0I2LuKUhuqozeafUD3aMI=";
# Rename the binary instead of symlinking to avoid conflict with the
# Azure version of kubelogin
postInstall = ''
mv $out/bin/kubelogin $out/bin/kubectl-oidc_login
'';
meta = with lib; {
description = "A Kubernetes credential plugin implementing OpenID Connect (OIDC) authentication";
inherit (src.meta) homepage;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
};
}