nixos-option: move shellcheck validation to passthru.tests.shellcheck

Fixes evaluation for riscv64-linux.
This commit is contained in:
misuzu
2025-01-11 12:41:38 +02:00
parent ed264a8c48
commit 7f3a5d09f6
+7 -11
View File
@@ -8,6 +8,7 @@
nix,
nixosTests,
shellcheck,
runCommand,
stdenvNoCC,
}:
@@ -19,7 +20,6 @@ stdenvNoCC.mkDerivation {
nativeBuildInputs = [
installShellFiles
makeWrapper
shellcheck
];
env = {
@@ -42,15 +42,6 @@ stdenvNoCC.mkDerivation {
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
shellcheck $out/bin/nixos-option
runHook postInstallCheck
'';
postFixup = ''
wrapProgram $out/bin/nixos-option \
--prefix PATH : ${
@@ -63,7 +54,12 @@ stdenvNoCC.mkDerivation {
}
'';
passthru.tests.installer-simpleUefiSystemdBoot = nixosTests.installer.simpleUefiSystemdBoot;
passthru.tests = {
installer-simpleUefiSystemdBoot = nixosTests.installer.simpleUefiSystemdBoot;
shellcheck = runCommand "nixos-option-shellchecked" { nativeBuildInputs = [ shellcheck ]; } ''
shellcheck ${./nixos-option.sh} && touch $out
'';
};
meta = {
description = "Evaluate NixOS configuration and return the properties of given option";