anchor.diff:  
       ${optionalString (extensionPack != null) ''
         mkdir -p "$share"
  -      "${fakeroot}/bin/fakeroot" "${stdenv.shell}" <<EXTHELPER
  +      "${fakeroot}/bin/fakeroot" "${stdenv.shell}" <<EOF
         "$libexec/VBoxExtPackHelperApp" install \
           --base-dir "$share/ExtensionPacks" \
           --cert-dir "$share/ExtPackCertificates" \
           --name "Oracle VM VirtualBox Extension Pack" \
           --tarball "${extensionPack}" \
           --sha-256 "${extensionPack.outputHash}"
  -      EXTHELPER
  +      EOF
       ''}
   
       ${optionalString (!headless) ''
  
positive.code:   # Wrap manually because we wrap just a small number of executables.
    dontWrapQtApps = true;
  
    buildInputs =
      [ acpica-tools dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
        libcap glib lvm2 alsa-lib curl libvpx pam makeself perl
        libXmu libpng libopus python ]
      ++ optional javaBindings jdk
      ++ optional pythonBindings python # Python is needed even when not building bindings
      ++ optional pulseSupport libpulseaudio
      ++ optionals (headless) [ libXrandr libGL ]
      ++ optionals (!headless) [ qtbase qtx11extras libXinerama SDL ]
      ++ optionals (enableWebService) [ gsoap zlib ];
  
    hardeningDisable = [ "format" "fortify" "pic" "stackprotector" ];
  
    prePatch = ''
      set -x
      sed -e 's@MKISOFS --version@MKISOFS -version@' \
          -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \
          -e 's@CXX_FLAGS="\(.*\)"@CXX_FLAGS="-std=c++11 \1"@' \
          ${optionalString (!headless) ''
          -e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \
  
negative.code: , alsa-lib, curl, libvpx, nettools, dbus, substituteAll, gsoap, zlib
  # If open-watcom-bin is not passed, VirtualBox will fall back to use
  # the shipped alternative sources (assembly).
  , open-watcom-bin
  , makeself, perl
  , javaBindings ? true, jdk # Almost doesn't affect closure size
  , pythonBindings ? false, python3
  , extensionPack ? null, fakeroot
  , pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
  , enableHardening ? false
  , headless ? false
  , enable32bitGuests ? true
  