xen: don't patch QEMU and OVMF if they aren't being built

This resolves the spurious 'directory not found' errors in the xen-slim
builds.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
This commit is contained in:
Fernando Rodrigues 2024-09-19 16:05:47 +00:00
parent 97e4f53044
commit 5c62c3d262
No known key found for this signature in database
GPG Key ID: CC3AE2EA00000000

View File

@ -532,8 +532,10 @@ stdenv.mkDerivation (finalAttrs: {
${deployPrefetchedSourcesPatches}
''
# Patch shebangs for QEMU and OVMF build scripts.
+ ''
+ lib.strings.optionalString withInternalQEMU ''
patchShebangs --build tools/qemu-xen/scripts/tracetool.py
''
+ lib.strings.optionalString withInternalOVMF ''
patchShebangs --build tools/firmware/ovmf-dir-remote/OvmfPkg/build.sh tools/firmware/ovmf-dir-remote/BaseTools/BinWrappers/PosixLike/{AmlToC,BrotliCompress,build,GenFfs,GenFv,GenFw,GenSec,LzmaCompress,TianoCompress,Trim,VfrCompile}
'';