From 7c995a453220b0269ffd844344982fcc195212ef Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 22 Apr 2020 13:13:59 +0200 Subject: [PATCH] virtualbox: build BIOS from C instead of alternative sources VirtualBox ships with "alternative BIOS sources" for its virtual BIOS. These are generated by first compiling the BIOS C sources with the Open Watcom toolchain, disassembling the output and checking in the disassembly into the VirtualBox repo. The result means that the BIOS C code cannot be patched, because it's not compiled from the C sources, if Open Watcom is not there. As Open Watcom is now available in nixpkgs, we can just ignore the alternative BIOS sources and compile it from C directly. --- pkgs/applications/virtualization/virtualbox/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index df7b81a43c8..7b7929d9f1d 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -3,6 +3,9 @@ , libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras , qttools, qtsvg, qtwayland, pkgconfig, which, docbook_xsl, docbook_xml_dtd_43 , alsaLib, curl, libvpx, nettools, dbus, substituteAll, fetchpatch +# If open-watcom-bin is not passed, VirtualBox will fall back to use +# the shipped alternative sources (assembly). +, open-watcom-bin ? null , makeself, perl , javaBindings ? true, jdk ? null # Almost doesn't affect closure size , pythonBindings ? false, python3 ? null @@ -148,6 +151,7 @@ in stdenv.mkDerivation { ${optionalString (!pulseSupport) "--disable-pulse"} \ ${optionalString (!enableHardening) "--disable-hardening"} \ ${optionalString (!enable32bitGuests) "--disable-vmmraw"} \ + ${optionalString (open-watcom-bin != null) "--with-ow-dir=${open-watcom-bin}"} \ --disable-kmods sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${libIDL}/lib/pkgconfig:${glib.dev}/lib/pkgconfig ${libIDL}/bin/libIDL-config-2@' \ -i AutoConfig.kmk