From b0e8cc5276d3a4dce4676e5144b7750db02cd4d5 Mon Sep 17 00:00:00 2001 From: Edwin Mackenzie-Owen Date: Fri, 2 Feb 2024 17:03:17 +0100 Subject: k9s: fix broken completion scripts on aarch64-darwin k9s apparently requires a writeable log location. Before this commit; the generated bash, fish, and zsh completion files in the aarch64-darwin* build had as their first line the error message: Fail to init k9s logs location could not create any of the following paths: /homeless-shelter/Library/Application Support * Yes, really only on aarch64-darwin. x86_64-darwin, x86_64-linux, and aarch64-linux are fine. Don't ask me why. --- pkgs/applications/networking/cluster/k9s/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/applications/networking/cluster/k9s') diff --git a/pkgs/applications/networking/cluster/k9s/default.nix b/pkgs/applications/networking/cluster/k9s/default.nix index 6463aa7a7ddb4..d405411299740 100644 --- a/pkgs/applications/networking/cluster/k9s/default.nix +++ b/pkgs/applications/networking/cluster/k9s/default.nix @@ -42,6 +42,11 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; postInstall = '' + # k9s requires a writeable log directory + # Otherwise an error message is printed + # into the completion scripts + export K9S_LOGS_DIR=$(mktemp -d) + installShellCompletion --cmd k9s \ --bash <($out/bin/k9s completion bash) \ --fish <($out/bin/k9s completion fish) \ -- cgit 1.4.1