From 0d079338b2f5e681304215e901eebf9e9cb1dd58 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sun, 16 Feb 2025 17:52:58 +0100 Subject: [PATCH] nixos/tests/installer: introduce `lix-simple` variant An installer tests exacerbates the distribution packaging but in the case of NixOS: the Nix package manager implementation. As part of our classical release management process, the Lix team tests whether a NixOS system installs just fine with Lix or not. To avoid bloating the CI needlessly and keeping it simple, we only introduce it on the simple variant and give a general way to pipe a Nix implementation inside of an installer test. Change-Id: I781da14475867dc2d946b740bad10af5de79ec5a Signed-off-by: Raito Bezarius --- nixos/tests/installer.nix | 5 +++++ pkgs/tools/package-management/lix/common-lix.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 6be3346d9850..db9fccaa2bb4 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -638,6 +638,7 @@ let clevisTest ? false, clevisFallbackTest ? false, disableFileSystems ? false, + selectNixPackage ? pkgs: pkgs.nixStable, }: let isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi); @@ -701,6 +702,7 @@ let virtualisation.rootDevice = "/dev/vdb"; hardware.enableAllFirmware = mkForce false; + nix.package = selectNixPackage pkgs; # The test cannot access the network, so any packages we # need must be included in the VM. @@ -1101,6 +1103,9 @@ in # The (almost) simplest partitioning scheme: a swap partition and # one big filesystem partition. simple = makeInstallerTest "simple" simple-test-config; + lix-simple = makeInstallerTest "simple" simple-test-config // { + selectNixPackage = pkgs: pkgs.lix; + }; switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake; diff --git a/pkgs/tools/package-management/lix/common-lix.nix b/pkgs/tools/package-management/lix/common-lix.nix index b9077e7672d4..6f819fb734ef 100644 --- a/pkgs/tools/package-management/lix/common-lix.nix +++ b/pkgs/tools/package-management/lix/common-lix.nix @@ -351,6 +351,7 @@ stdenv.mkDerivation (finalAttrs: { inherit aws-sdk-cpp boehmgc; tests = { misc = nixosTests.nix-misc.lix; + installer = nixosTests.installer.lix-simple; }; };