system-manager: fix test sandbox failure, add latest-nix test

Add writableTmpDirAsHomeHook to nativeCheckInputs to fix the
test_try_nix_eval test failure caused by Nix trying to create
/homeless-shelter/.cache/nix in the sandbox.

Add passthru.tests.latest-nix to verify system-manager builds
and passes tests with nixVersions.latest.

Related: NixOS/nixpkgs#505121
This commit is contained in:
Philip Taron
2026-03-31 14:18:58 -07:00
parent c891306b42
commit 11bda3b3bd
+8 -1
View File
@@ -6,8 +6,11 @@
pkg-config,
clippy,
nix,
nixVersions,
cargo,
nix-update-script,
writableTmpDirAsHomeHook,
system-manager,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -32,6 +35,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
clippy
nix
cargo
writableTmpDirAsHomeHook
];
preCheck = ''
@@ -43,7 +47,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
export NIX_STATE_DIR=$TMPDIR
'';
passthru.updateScript = nix-update-script { };
passthru = {
updateScript = nix-update-script { };
tests.latest-nix = system-manager.override { nix = nixVersions.latest; };
};
meta = {
description = "Manage system config using nix on any distro";