From 5c62c3d26250d7dc844c195d8656bf9ed29462ff Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Thu, 19 Sep 2024 16:05:47 +0000 Subject: [PATCH] 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 --- pkgs/applications/virtualization/xen/generic/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/xen/generic/default.nix b/pkgs/applications/virtualization/xen/generic/default.nix index c81a13daa99a..f7bbde81663f 100644 --- a/pkgs/applications/virtualization/xen/generic/default.nix +++ b/pkgs/applications/virtualization/xen/generic/default.nix @@ -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} '';