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) \ 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