From c407873d50f7ec6aa643f3052475160068696b01 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 21 Apr 2023 11:04:48 -0700 Subject: [PATCH] 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"