sou: switch to passthru version test

requires $HOME to be set
This commit is contained in:
awwpotato 2025-04-17 16:52:09 -07:00
parent 1ceddee80f
commit c20a55598a
No known key found for this signature in database

View file

@ -3,7 +3,8 @@
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
nix-update-script, nix-update-script,
versionCheckHook, testers,
sou,
}: }:
buildGoModule (finalAttrs: { buildGoModule (finalAttrs: {
@ -25,13 +26,16 @@ buildGoModule (finalAttrs: {
"-X=main.version=${finalAttrs.version}" "-X=main.version=${finalAttrs.version}"
]; ];
doInstallCheck = true;
nativeInstallCheck = [ versionCheckHook ];
# Some of the tests use localhost networking # Some of the tests use localhost networking
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
passthru.updateScript = nix-update-script { }; passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
command = "HOME=$TMPDIR sou --version";
package = sou;
};
};
meta = { meta = {
description = "Tool for exploring files in container image layers"; description = "Tool for exploring files in container image layers";