Unverified Commit 11bda3b3 authored by Philip Taron's avatar Philip Taron
Browse files

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
parent c891306b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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";