From c20a55598ab332713addaf293cd7ba2df58a177d Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 16:52:09 -0700 Subject: [PATCH] sou: switch to passthru version test requires $HOME to be set --- pkgs/by-name/so/sou/package.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/so/sou/package.nix b/pkgs/by-name/so/sou/package.nix index 0ee536e93a07..56fd4f5d0e32 100644 --- a/pkgs/by-name/so/sou/package.nix +++ b/pkgs/by-name/so/sou/package.nix @@ -3,7 +3,8 @@ buildGoModule, fetchFromGitHub, nix-update-script, - versionCheckHook, + testers, + sou, }: buildGoModule (finalAttrs: { @@ -25,13 +26,16 @@ buildGoModule (finalAttrs: { "-X=main.version=${finalAttrs.version}" ]; - doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; - # Some of the tests use localhost networking __darwinAllowLocalNetworking = true; - passthru.updateScript = nix-update-script { }; + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + command = "HOME=$TMPDIR sou --version"; + package = sou; + }; + }; meta = { description = "Tool for exploring files in container image layers";