Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions pkgs/applications/virtualization/virtualbox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
yasm,
glslang,
nixosTests,
# If open-watcom-bin is not passed, VirtualBox will fall back to use
# the shipped alternative sources (assembly).
open-watcom-bin,
makeself,
perl,
vulkan-loader,
Expand Down Expand Up @@ -230,11 +233,18 @@ stdenv.mkDerivation (finalAttrs: {
})
# While the KVM patch should not break any other behavior if --with-kvm is not specified,
# we don't take any chances and only apply it if people actually want to use KVM support.
++ optional enableKvm (fetchpatch {
name = "virtualbox-${finalAttrs.virtualboxVersion}-kvm-dev-${finalAttrs.kvmPatchVersion}.patch";
url = "https://github.com/cyberus-technology/virtualbox-kvm/releases/download/dev-${finalAttrs.kvmPatchVersion}/kvm-backend-${finalAttrs.virtualboxVersion}-dev-${finalAttrs.kvmPatchVersion}.patch";
hash = finalAttrs.kvmPatchHash;
})
++ optional enableKvm (
let
patchVboxVersion =
# There is no updated patch for 7.0.22 yet, but the older one still applies.
if finalAttrs.virtualboxVersion == "7.0.22" then "7.0.20" else finalAttrs.virtualboxVersion;
in
fetchpatch {
name = "virtualbox-${finalAttrs.virtualboxVersion}-kvm-dev-${finalAttrs.kvmPatchVersion}.patch";
url = "https://github.com/cyberus-technology/virtualbox-kvm/releases/download/dev-${finalAttrs.kvmPatchVersion}/kvm-backend-${patchVboxVersion}-dev-${finalAttrs.kvmPatchVersion}.patch";
hash = finalAttrs.kvmPatchHash;
}
)
++ [
./qt-dependency-paths.patch
# https://github.com/NixOS/nixpkgs/issues/123851
Expand Down Expand Up @@ -292,6 +302,7 @@ stdenv.mkDerivation (finalAttrs: {
${optionalString (!enableHardening) "--disable-hardening"} \
${optionalString (!enable32bitGuests) "--disable-vmmraw"} \
${optionalString enableWebService "--enable-webservice"} \
${optionalString (open-watcom-bin != null) "--with-ow-dir=${open-watcom-bin}"} \
${optionalString (enableKvm) "--with-kvm"} \
${extraConfigureFlags} \
--disable-kmods
Expand Down
5 changes: 5 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33072,6 +33072,11 @@ with pkgs;

# VirtualBox uses wsimport, which was removed after JDK 8.
jdk = jdk8;

# Opt out of building the guest BIOS sources with the problematic Open Watcom
# toolchain. People who need to build the BIOS from sources (for example to
# apply patches) can override this.
open-watcom-bin = null;
};

virtualboxKvm = lowPrio (virtualbox.override {
Expand Down