nixpkgs/pkgs/applications/networking/cluster/k9s/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, nix-update-script, k9s }:
2019-07-27 17:46:08 +01:00
buildGoModule rec {
pname = "k9s";
2023-12-24 08:17:56 +00:00
version = "0.30.0";
2019-07-27 17:46:08 +01:00
src = fetchFromGitHub {
2023-12-19 07:40:09 +00:00
owner = "derailed";
repo = "k9s";
rev = "v${version}";
2023-12-24 08:17:56 +00:00
hash = "sha256-ESf1BoQ3DAz0z5J/2PeX3Vq8V3o87sKi7c1250gDGqk=";
2019-07-27 17:46:08 +01:00
};
2021-08-26 07:45:51 +01:00
ldflags = [
2023-12-19 07:40:09 +00:00
"-s"
"-w"
2021-08-26 07:45:51 +01:00
"-X github.com/derailed/k9s/cmd.version=${version}"
"-X github.com/derailed/k9s/cmd.commit=${src.rev}"
"-X github.com/derailed/k9s/cmd.date=1970-01-01T00:00:00Z"
2021-08-26 07:45:51 +01:00
];
tags = [ "netgo" ];
2019-07-27 17:46:08 +01:00
proxyVendor = true;
2023-12-24 08:17:56 +00:00
vendorHash = "sha256-A8kqMwRMl1Jdonz9Ii79pvwA8RKg8+7XVe1VlPBVhFA=";
2021-12-03 13:56:38 +00:00
2022-03-18 03:28:20 +00:00
# TODO investigate why some config tests are failing
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);
# Required to workaround test check error:
preCheck = "export HOME=$(mktemp -d)";
# For arch != x86
# {"level":"fatal","error":"could not create any of the following paths: /homeless-shelter/.config, /etc/xdg","time":"2022-06-28T15:52:36Z","message":"Unable to create configuration directory for k9s"}
passthru = {
tests.version = testers.testVersion {
package = k9s;
command = "HOME=$(mktemp -d) k9s version -s";
inherit version;
};
updateScript = nix-update-script { };
};
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd k9s \
--bash <($out/bin/k9s completion bash) \
--fish <($out/bin/k9s completion fish) \
--zsh <($out/bin/k9s completion zsh)
'';
meta = with lib; {
description = "Kubernetes CLI To Manage Your Clusters In Style";
2020-03-14 07:15:49 +00:00
homepage = "https://github.com/derailed/k9s";
2019-07-27 17:46:08 +01:00
license = licenses.asl20;
2023-05-08 10:02:23 +01:00
maintainers = with maintainers; [ Gonzih markus1189 bryanasdev000 qjoly ];
2019-07-27 17:46:08 +01:00
};
2020-07-08 17:16:04 +01:00
}