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: 
    # Add a ‘qemu-kvm’ wrapper for compatibility/convenience.
    postInstall = ''
      if [ -x $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} ]; then
        makeWrapper $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} \
                    $out/bin/qemu-kvm \
                    --add-flags "\$([ -r /dev/kvm -a -w /dev/kvm ] && echo -enable-kvm)"
      fi
    '';
  
negative.code: 
    # Builds in ~3h with 2 cores, and ~20m with a big-parallel builder.
    requiredSystemFeatures = [ "big-parallel" ];
  
    emitKvmWarnings = ''
      #!${runtimeShell}
      WARNCOL='\033[1;35m'
      NEUTRALCOL='\033[0m'
      WARNING="''${WARNCOL}warning:''${NEUTRALCOL}"
      if [ ! -e /dev/kvm ]; then
        echo -e "''${WARNING} KVM is not available - execution will be slow" >&2
        echo "Consider installing KVM for hardware-accelerated execution." >&2
        echo "If KVM is already installed make sure the kernel module is loaded." >&2
      elif [ ! -r /dev/kvm -o ! -w /dev/kvm ]; then
        echo -e "''${WARNING} /dev/kvm is not read-/writable - execution will be slow" >&2
        echo "/dev/kvm needs to be read-/writable by the user executing QEMU." >&2
        echo "" >&2
        echo "For hardware-acceleration inside the nix build sandbox /dev/kvm" >&2
        echo "must be world-read-/writable (rw-rw-rw-)." >&2
      fi
    '';
  
    passAsFile = [ "emitKvmWarnings" ];
  
    meta = with lib; {
      homepage = "http://www.qemu.org/";
  