about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorEdwin Mackenzie-Owen <edwin.mowen@gmail.com>2024-02-02 17:03:17 +0100
committerEdwin Mackenzie-Owen <edwin.mowen@gmail.com>2024-02-02 17:36:18 +0100
commitb0e8cc5276d3a4dce4676e5144b7750db02cd4d5 (patch)
treec24d072c0be9c8802c8cc0ebb0239031bfb2542d /pkgs/applications/networking
parent5716841359b49ae064b982acb81861950a915c41 (diff)
downloadnixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar.gz
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar.bz2
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar.lz
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar.xz
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.tar.zst
nixlib-b0e8cc5276d3a4dce4676e5144b7750db02cd4d5.zip
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.
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/k9s/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/k9s/default.nix b/pkgs/applications/networking/cluster/k9s/default.nix
index 6463aa7a7ddb..d40541129974 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) \