From c407873d50f7ec6aa643f3052475160068696b01 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 21 Apr 2023 11:04:48 -0700 Subject: [PATCH 1/2] qemu: allow to disable generation of documentation I've been having trouble with some qemu builds since the v8.0.0 bump failing with: ``` kernel-doc 'perl /build/qemu/docs/../scripts/kernel-doc -rst -enable-lineno -sphinx-version 5.3.0 -Werror /build/qemu/docs/../include/qemu/bitops.h' processing failed with: [Errno 2] No such file or directory: 'perl' ``` ... this happens despite `perl` being part of `stdenv`. Adding `perl` to `nativeBuildInputs` doesn't seem to fix it. It is handy to be able to simply skip the docs in situations like this in order to maintain forward progress, so this commit adds `enableDocs?true` to allow that. --- pkgs/applications/virtualization/qemu/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index bef33e219b4d..0761d58c7265 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -27,6 +27,7 @@ , tpmSupport ? true , uringSupport ? stdenv.isLinux, liburing , canokeySupport ? false, canokey-qemu +, enableDocs ? true , hostCpuOnly ? false , hostCpuTargets ? (if hostCpuOnly then (lib.optional stdenv.isx86_64 "i386-softmmu" @@ -147,7 +148,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-strip" # We'll strip ourselves after separating debug info. - "--enable-docs" + (lib.enableFeature enableDocs "docs") "--enable-tools" "--localstatedir=/var" "--sysconfdir=/etc" From 06e8d82e9c74205ffa2fe4dda06c7430064243d2 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 22 Apr 2023 00:38:56 +0300 Subject: [PATCH 2/2] lib/systems: disable docs in qemu-user 45M -> 31M --- lib/systems/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 7e6fa5ecfb4b..b2cb8848f08b 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -185,6 +185,7 @@ rec { pulseSupport = false; smbdSupport = false; seccompSupport = false; + enableDocs = false; hostCpuTargets = [ "${final.qemuArch}-linux-user" ]; }; wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;