From 44a41a2e11d8e08045ad2ab09830c00865848496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Fri, 21 May 2021 08:52:56 +0200 Subject: [PATCH] qemu: fix darwin build Co-authored-by: Michael Roitzsch --- pkgs/applications/virtualization/qemu/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index f471ac8c064..0a9de4eb10a 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -103,10 +103,17 @@ stdenv.mkDerivation rec { }) ]; - # Otherwise tries to ensure /var/run exists. postPatch = '' + # Otherwise tries to ensure /var/run exists. sed -i "/install_subdir('run', install_dir: get_option('localstatedir'))/d" \ qga/meson.build + + # TODO: On aarch64-darwin, we automatically codesign everything, but qemu + # needs specific entitlements and does its own signing. This codesign + # command fails, but we have no fix at the moment, so this disables it. + # This means `-accel hvf` is broken for now, on aarch64-darwin only. + substituteInPlace meson.build \ + --replace 'if exe_sign' 'if false' ''; preConfigure = ''