mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 05:23:28 +01:00
tests: use nixpkgs qemu-common for proper machine type configuration
QEMU on aarch64 requires an explicit machine type (e.g., '-machine virt'), unlike x86_64 which has a default. Previously, the test script hardcoded 'qemu-kvm' without machine type arguments, causing aarch64 tests to fail with "No machine specified, and there is no default". By importing and using nixpkgs' qemu-common.nix library, we reuse the existing platform-specific QEMU configuration logic.
This commit is contained in:
1 parent
af087d076d
commit
a19c2b6d3a
4 files changed
+34
-6
No files matched your search
+12
-1
@@ -3,11 +3,22 @@
|
||||
rootMountPoint ? "/mnt",
|
||||
makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>,
|
||||
eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>,
|
||||
qemu-common ? import <nixpkgs/nixos/lib/qemu-common.nix>,
|
||||
}:
|
||||
let
|
||||
# qemu-common is a function that takes { lib, pkgs } and returns QEMU utilities
|
||||
qemu-common-lib = pkgs: qemu-common { inherit lib pkgs; };
|
||||
|
||||
outputs = import ../default.nix { inherit lib diskoLib; };
|
||||
diskoLib = {
|
||||
testLib = import ./tests.nix { inherit lib makeTest eval-config; };
|
||||
testLib = import ./tests.nix {
|
||||
inherit
|
||||
lib
|
||||
makeTest
|
||||
eval-config
|
||||
qemu-common-lib
|
||||
;
|
||||
};
|
||||
# like lib.types.oneOf but instead of a list takes an attrset
|
||||
# uses the field "type" to find the correct type in the attrset
|
||||
subType =
|
||||
|
||||
Reference in new issue
Block a user