From c61147a3b32723a35baac8400104ae5e87ce5e87 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Tue, 24 Mar 2026 10:52:41 +0800 Subject: [PATCH 1/2] okteto: use writableTmpDirAsHomeHook --- pkgs/by-name/ok/okteto/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ok/okteto/package.nix b/pkgs/by-name/ok/okteto/package.nix index cd9c55c5d8ee..33850f0322b1 100644 --- a/pkgs/by-name/ok/okteto/package.nix +++ b/pkgs/by-name/ok/okteto/package.nix @@ -4,6 +4,7 @@ buildGoModule, fetchFromGitHub, installShellFiles, + writableTmpDirAsHomeHook, testers, }: @@ -45,9 +46,7 @@ buildGoModule (finalAttrs: { "static_build" ]; - preCheck = '' - export HOME="$(mktemp -d)" - ''; + nativeCheckInputs = [ writableTmpDirAsHomeHook ]; checkFlags = let From 7487a04be9f0fbf7ae50b17f761ef03c591299fe Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Tue, 24 Mar 2026 11:06:23 +0800 Subject: [PATCH 2/2] harbor-cli: use writableTmpDirAsHomeHook --- pkgs/by-name/ha/harbor-cli/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ha/harbor-cli/package.nix b/pkgs/by-name/ha/harbor-cli/package.nix index ac8ad8499dca..6364b535addd 100644 --- a/pkgs/by-name/ha/harbor-cli/package.nix +++ b/pkgs/by-name/ha/harbor-cli/package.nix @@ -5,6 +5,7 @@ fetchFromGitHub, testers, installShellFiles, + writableTmpDirAsHomeHook, }: buildGoModule (finalAttrs: { @@ -25,7 +26,10 @@ buildGoModule (finalAttrs: { "doc" ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + writableTmpDirAsHomeHook + ]; ldflags = [ "-s" @@ -36,8 +40,6 @@ buildGoModule (finalAttrs: { doCheck = false; # Network required postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - export HOME="$(mktemp -d)" - installShellCompletion --cmd harbor \ --bash <($out/bin/harbor completion bash) \ --fish <($out/bin/harbor completion fish) \