diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index a267c71e2d6..dd1a2da0171 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -50,8 +50,9 @@ stdenv.mkDerivation rec { sha256 = "1g0pvx4qbirpcn9mni704y03n3lvkmw2c0rbcwvydyr8ns4xh66b"; }; - nativeBuildInputs = [ python python.pkgs.sphinx pkg-config flex bison meson ninja autoPatchelfHook ] - ++ optionals gtkSupport [ wrapGAppsHook ]; + nativeBuildInputs = [ python python.pkgs.sphinx pkg-config flex bison meson ninja ] + ++ optionals gtkSupport [ wrapGAppsHook ] + ++ optionals stdenv.isLinux [ autoPatchelfHook ]; buildInputs = [ zlib glib perl pixman vde2 texinfo makeWrapper lzo snappy @@ -108,6 +109,10 @@ stdenv.mkDerivation rec { # this script isn't marked as executable b/c it's indirectly used by meson. Needed to patch its shebang chmod +x ./scripts/shaderinclude.pl patchShebangs . + # avoid conflicts with libc++ include for + mv VERSION QEMU_VERSION + substituteInPlace meson.build \ + --replace "'VERSION'" "'QEMU_VERSION'" '' + optionalString stdenv.hostPlatform.isMusl '' NIX_CFLAGS_COMPILE+=" -D_LINUX_SYSINFO_H" ''; @@ -119,8 +124,6 @@ stdenv.mkDerivation rec { "--enable-guest-agent" "--sysconfdir=/etc" ] - # disable sysctl check on darwin. - ++ optional stdenv.isDarwin "--cpu=x86_64" ++ optional numaSupport "--enable-numa" ++ optional seccompSupport "--enable-seccomp" ++ optional smartcardSupport "--enable-smartcard"