az-pim-cli: switch to passthru version test

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

View file

@ -5,8 +5,9 @@
installShellFiles, installShellFiles,
stdenv, stdenv,
buildPackages, buildPackages,
versionCheckHook,
nix-update-script, nix-update-script,
testers,
az-pim-cli,
}: }:
buildGoModule (finalAttrs: { buildGoModule (finalAttrs: {
pname = "az-pim-cli"; pname = "az-pim-cli";
@ -37,11 +38,13 @@ buildGoModule (finalAttrs: {
'' ''
); );
doInstallCheck = true; passthru = {
nativeInstallCheck = [ versionCheckHook ]; updateScript = nix-update-script { };
versionCheckProgramArg = "version"; tests.version = testers.testVersion {
command = "HOME=$TMPDIR az-pim-cli --version";
passthru.updateScript = nix-update-script { }; package = az-pim-cli;
};
};
meta = { meta = {
description = "List and activate Azure Entra ID Privileged Identity Management roles from the CLI"; description = "List and activate Azure Entra ID Privileged Identity Management roles from the CLI";