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.
This commit is contained in:
Adam Joseph 2023-04-21 11:04:48 -07:00 committed by Artturin
parent 89d59988a7
commit c407873d50

View File

@ -27,6 +27,7 @@
, tpmSupport ? true , tpmSupport ? true
, uringSupport ? stdenv.isLinux, liburing , uringSupport ? stdenv.isLinux, liburing
, canokeySupport ? false, canokey-qemu , canokeySupport ? false, canokey-qemu
, enableDocs ? true
, hostCpuOnly ? false , hostCpuOnly ? false
, hostCpuTargets ? (if hostCpuOnly , hostCpuTargets ? (if hostCpuOnly
then (lib.optional stdenv.isx86_64 "i386-softmmu" then (lib.optional stdenv.isx86_64 "i386-softmmu"
@ -147,7 +148,7 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--disable-strip" # We'll strip ourselves after separating debug info. "--disable-strip" # We'll strip ourselves after separating debug info.
"--enable-docs" (lib.enableFeature enableDocs "docs")
"--enable-tools" "--enable-tools"
"--localstatedir=/var" "--localstatedir=/var"
"--sysconfdir=/etc" "--sysconfdir=/etc"