mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
nixos/test-driver: fix GPU Qemu argument condition
In 48995a6ef9 (#527511), the `isLinux`
and `isAarch64` condition were taken from the `hostPkgs`, and not the
guest system's `pkgs`.
Graphical NixOS tests on aarch64-darwin work with this commit thanks
to the removed `isLinux` argument, and the `isAarch64` argument should
be taken from the guest's OS, per [qemu's docs][1]:
> The recommended option is virtio-gpu-pci; this is the only one which
> will work correctly with KVM. You may also need to ensure your guest
> kernel is configured with support for this;
[1]: https://www.qemu.org/docs/master/system/arm/virt
This commit is contained in:
committed by
Doron Behar
parent
8066ed205e
commit
0f6944200e
@@ -14,7 +14,7 @@ let
|
||||
|
||||
inherit (config) sshBackdoor;
|
||||
|
||||
inherit (hostPkgs.stdenv.hostPlatform) isLinux isAarch64;
|
||||
inherit (hostPkgs.stdenv.hostPlatform) isLinux;
|
||||
|
||||
# Reifies and correctly wraps the python test driver for
|
||||
# the respective qemu version and with or without ocr support
|
||||
@@ -249,7 +249,7 @@ in
|
||||
passthru.driver = config.driver;
|
||||
|
||||
nodeDefaults =
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# This is needed for the SSH backdoor to function.
|
||||
# Set this to `true` by default to not change essential QEMU flags
|
||||
@@ -258,7 +258,7 @@ in
|
||||
# If needed, this can still be turned off.
|
||||
virtualisation.qemu.enableSharedMemory = lib.mkDefault isLinux;
|
||||
# Needed for screenshots to work (in e.g `nixosTests.login`)
|
||||
virtualisation.qemu.options = lib.optionals (isLinux && isAarch64) [
|
||||
virtualisation.qemu.options = lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [
|
||||
"-device virtio-gpu-pci"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user