anchor.diff:  { lib, stdenv, fetchurl, fetchpatch, python, zlib, pkg-config, glib
   , perl, pixman, vde2, alsa-lib, texinfo, flex
   , bison, lzo, snappy, libaio, libtasn1, gnutls, nettle, curl, ninja, meson, sigtool
  -, makeWrapper, autoPatchelfHook
  +, makeWrapper, autoPatchelfHook, runtimeShell
   , attr, libcap, libcap_ng
   , CoreServices, Cocoa, Hypervisor, rez, setfile
   , numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl
  
positive.code: 
    # Builds in ~3h with 2 cores, and ~20m with a big-parallel builder.
    requiredSystemFeatures = [ "big-parallel" ];
  
    meta = with lib; {
      homepage = "http://www.qemu.org/";
  
negative.code: 
    # Add a ‘qemu-kvm’ wrapper for compatibility/convenience.
    postInstall = ''
      cp -- $emitKvmWarningsPath $out/libexec/emit-kvm-warnings
      chmod a+x -- $out/libexec/emit-kvm-warnings
      if [ -x $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} ]; then
        makeWrapper $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} \
                    $out/bin/qemu-kvm \
                    --run $out/libexec/emit-kvm-warnings \
                    --add-flags "\$([ -r /dev/kvm -a -w /dev/kvm ] && echo -enable-kvm)"
      fi
    '';
  