diff options
author | Nick Cao <nickcao@nichi.co> | 2021-11-28 17:40:29 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2021-12-27 18:02:12 +0800 |
commit | f90a24f944a1519351cda862bd37259e0eaa1a6c (patch) | |
tree | 21b4c29588276513ce0e0b6bf549b398604acb15 /pkgs/applications/virtualization/qemu | |
parent | 8d2ea10d45dde9b06c108cd509b823c07b71b4da (diff) |
qemu: fix cross compilation
Diffstat (limited to 'pkgs/applications/virtualization/qemu')
-rw-r--r-- | pkgs/applications/virtualization/qemu/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index c53eb25af39f5..7a29cf222b7d9 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, python, zlib, pkg-config, glib +{ lib, stdenv, fetchurl, fetchpatch, python3, python3Packages, zlib, pkg-config, glib, buildPackages , perl, pixman, vde2, alsa-lib, texinfo, flex , bison, lzo, snappy, libaio, libtasn1, gnutls, nettle, curl, ninja, meson, sigtool , makeWrapper, runtimeShell @@ -51,7 +51,9 @@ stdenv.mkDerivation rec { sha256 = "15iw7982g6vc4jy1l9kk1z9sl5bm1bdbwr74y7nvwjs1nffhig7f"; }; - nativeBuildInputs = [ makeWrapper python python.pkgs.sphinx python.pkgs.sphinx_rtd_theme pkg-config flex bison meson ninja ] + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + nativeBuildInputs = [ makeWrapper pkg-config flex bison meson ninja perl python3 python3Packages.sphinx python3Packages.sphinx_rtd_theme ] ++ lib.optionals gtkSupport [ wrapGAppsHook ] ++ lib.optionals stdenv.isDarwin [ sigtool ]; @@ -190,6 +192,8 @@ stdenv.mkDerivation rec { # Always use our Meson, not the bundled version, which doesn't # have our patches and will be subtly broken because of that. "--meson=meson" + "--cross-prefix=${stdenv.cc.targetPrefix}" + "--cpu=${stdenv.hostPlatform.uname.processor}" ] ++ lib.optional numaSupport "--enable-numa" ++ lib.optional seccompSupport "--enable-seccomp" ++ lib.optional smartcardSupport "--enable-smartcard" |