diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-24 07:48:17 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-24 07:48:17 +0000 |
commit | 6e980e645823095c83c12eea43691e7a407bd6b4 (patch) | |
tree | 39fa5d5936cc88f077037a2d6502d0babef4d54a | |
parent | 8d56c1fe5a61939290694404947fa4127e7ced2f (diff) | |
download | nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar.gz nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar.bz2 nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar.lz nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar.xz nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.tar.zst nixpkgs-6e980e645823095c83c12eea43691e7a407bd6b4.zip |
qemu_kvm.tests: use finalPackage
This makes qemu_kvm.tests do the right thing — building qemu_kvm with tests enabled. Previously, it would always build qemu, so all targets would be enabled, even if accessed through qemu_kvm.tests.
-rw-r--r-- | pkgs/applications/virtualization/qemu/default.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 16f9d1a2499..8da8d12cb5f 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -35,8 +35,6 @@ ++ ["${stdenv.hostPlatform.qemuArch}-softmmu"]) else null) , nixosTestRunner ? false -, doCheck ? false -, qemu # for passthru.tests , gitUpdater }: @@ -44,7 +42,7 @@ let hexagonSupport = hostCpuTargets == null || lib.elem "hexagon" hostCpuTargets; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qemu" + lib.optionalString xenSupport "-xen" + lib.optionalString hostCpuOnly "-host-cpu-only" @@ -52,7 +50,7 @@ stdenv.mkDerivation rec { version = "8.0.4"; src = fetchurl { - url = "https://download.qemu.org/qemu-${version}.tar.xz"; + url = "https://download.qemu.org/qemu-${finalAttrs.version}.tar.xz"; hash = "sha256-gcgX3aOK+Vi+W+8abPVbZYuy0/uHwealcd5reyxEUWw="; }; @@ -207,7 +205,7 @@ stdenv.mkDerivation rec { preBuild = "cd build"; # tests can still timeout on slower systems - inherit doCheck; + doCheck = false; nativeCheckInputs = [ socat ]; preCheck = '' # time limits are a little meagre for a build machine that's @@ -248,7 +246,7 @@ stdenv.mkDerivation rec { passthru = { qemu-system-i386 = "bin/qemu-system-i386"; tests = { - qemu-tests = qemu.override { doCheck = true; }; + qemu-tests = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); }; updateScript = gitUpdater { # No nicer place to find latest release. @@ -269,4 +267,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ eelco qyliss ]; platforms = platforms.unix; }; -} +}) |