From 11bda3b3bd1b5287d46134bd1de9164da964c18e Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Tue, 31 Mar 2026 14:18:58 -0700 Subject: [PATCH] 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 --- pkgs/by-name/sy/system-manager/package.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/sy/system-manager/package.nix b/pkgs/by-name/sy/system-manager/package.nix index be7a6640f84f..059c1abbdb7a 100644 --- a/pkgs/by-name/sy/system-manager/package.nix +++ b/pkgs/by-name/sy/system-manager/package.nix @@ -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";