From 7ab57bb76bfb4c3ce6c02a9638bb19014e64f0f6 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 16:40:34 -0700 Subject: [PATCH 1/5] rust-stakeholder: remove versionCheckHook isn't a versioned program --- pkgs/by-name/ru/rust-stakeholder/package.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/by-name/ru/rust-stakeholder/package.nix b/pkgs/by-name/ru/rust-stakeholder/package.nix index 1180b6cad19b..934e826bec1f 100644 --- a/pkgs/by-name/ru/rust-stakeholder/package.nix +++ b/pkgs/by-name/ru/rust-stakeholder/package.nix @@ -2,7 +2,6 @@ lib, fetchFromGitHub, rustPlatform, - versionCheckHook, nix-update-script, }: rustPlatform.buildRustPackage { @@ -19,10 +18,6 @@ rustPlatform.buildRustPackage { useFetchCargoVendor = true; cargoHash = "sha256-NxO+7Wh8Ff6RPFtmbEa3EJszfDaZDXGWZDAoXPEAnpI="; - nativeInstallCheck = [ versionCheckHook ]; - versionCheckProgramArg = "--version"; - doInstallCheck = true; - passthru.updateScript = nix-update-script { }; meta = { From c5c7b6913ba7310b537b12f4d6c8eebcd7ab8805 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 16:41:30 -0700 Subject: [PATCH 2/5] ollama: remove versionCheckHook was failing with "panic: $HOME is not defined" --- pkgs/by-name/ol/ollama/package.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix index 005c476e3107..d1f9837372db 100644 --- a/pkgs/by-name/ol/ollama/package.nix +++ b/pkgs/by-name/ol/ollama/package.nix @@ -19,7 +19,6 @@ cudaArches ? cudaPackages.cudaFlags.realArches or [ ], darwin, autoAddDriverRunpath, - versionCheckHook, # passthru nixosTests, @@ -247,10 +246,6 @@ goBuild { __darwinAllowLocalNetworking = true; - nativeInstallCheck = [ versionCheckHook ]; - versionCheckProgramArg = "--version"; - doInstallCheck = true; - passthru = { tests = { From 1ceddee80fc0a44f0e4cd3c069d5e86166959277 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 16:47:36 -0700 Subject: [PATCH 3/5] az-pim-cli: switch to passthru version test --version requires $HOME to be set --- pkgs/by-name/az/az-pim-cli/package.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/az/az-pim-cli/package.nix b/pkgs/by-name/az/az-pim-cli/package.nix index 8878135ed3e8..e595583cde3b 100644 --- a/pkgs/by-name/az/az-pim-cli/package.nix +++ b/pkgs/by-name/az/az-pim-cli/package.nix @@ -5,8 +5,9 @@ installShellFiles, stdenv, buildPackages, - versionCheckHook, nix-update-script, + testers, + az-pim-cli, }: buildGoModule (finalAttrs: { pname = "az-pim-cli"; @@ -37,11 +38,13 @@ buildGoModule (finalAttrs: { '' ); - doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; - versionCheckProgramArg = "version"; - - passthru.updateScript = nix-update-script { }; + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + command = "HOME=$TMPDIR az-pim-cli --version"; + package = az-pim-cli; + }; + }; meta = { description = "List and activate Azure Entra ID Privileged Identity Management roles from the CLI"; From c20a55598ab332713addaf293cd7ba2df58a177d Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 16:52:09 -0700 Subject: [PATCH 4/5] 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"; From 93095a5b67a20017f366026a62eb1427d1c48ab3 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Thu, 17 Apr 2025 13:50:34 -0700 Subject: [PATCH 5/5] treewide: fix versionCheckHook in nativeInstallCheck --- pkgs/by-name/fo/foodfetch/package.nix | 2 +- pkgs/by-name/kr/krep/package.nix | 2 +- pkgs/by-name/pe/petidomo/package.nix | 2 +- pkgs/by-name/tf/tfmigrate/package.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fo/foodfetch/package.nix b/pkgs/by-name/fo/foodfetch/package.nix index 83b2f0b9a864..fc4cfca5c529 100644 --- a/pkgs/by-name/fo/foodfetch/package.nix +++ b/pkgs/by-name/fo/foodfetch/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage (finalAttrs: { buildInputs = [ openssl ]; doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; + nativeInstallCheckInputs = [ versionCheckHook ]; passthru.updateScript = nix-update-script { }; diff --git a/pkgs/by-name/kr/krep/package.nix b/pkgs/by-name/kr/krep/package.nix index 93a9c2b483c5..86281d0bc725 100644 --- a/pkgs/by-name/kr/krep/package.nix +++ b/pkgs/by-name/kr/krep/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; + nativeInstallCheckInputs = [ versionCheckHook ]; meta = { description = "Blazingly fast string search utility designed for performance-critical applications"; diff --git a/pkgs/by-name/pe/petidomo/package.nix b/pkgs/by-name/pe/petidomo/package.nix index d9047bf4e62b..f277e5e3dfbd 100644 --- a/pkgs/by-name/pe/petidomo/package.nix +++ b/pkgs/by-name/pe/petidomo/package.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; + nativeInstallCheckInputs = [ versionCheckHook ]; meta = { homepage = "https://petidomo.sourceforge.net/"; diff --git a/pkgs/by-name/tf/tfmigrate/package.nix b/pkgs/by-name/tf/tfmigrate/package.nix index 7af98f909ead..4afa23225005 100644 --- a/pkgs/by-name/tf/tfmigrate/package.nix +++ b/pkgs/by-name/tf/tfmigrate/package.nix @@ -24,7 +24,7 @@ buildGoModule (finalAttrs: { ]; doInstallCheck = true; - nativeInstallCheck = [ versionCheckHook ]; + nativeInstallCheckInputs = [ versionCheckHook ]; passthru.updateScript = nix-update-script { };