Merge pull request #112440 from bobrik/ivan/qemu-aarch64-darwin-prep

This commit is contained in:
Jörg Thalheim 2021-02-16 06:49:16 +00:00 committed by GitHub
commit 3f2321e5c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 <version>
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"