2022-07-28 11:23:17 +00:00
|
|
|
{ fetchurl, lib, virtualbox }:
|
2018-08-08 14:22:02 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2020-03-17 10:23:06 +00:00
|
|
|
let
|
|
|
|
inherit (virtualbox) version;
|
2018-08-08 14:22:02 +00:00
|
|
|
in
|
2018-08-10 05:28:57 +00:00
|
|
|
fetchurl rec {
|
2018-12-07 16:05:55 +00:00
|
|
|
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack";
|
|
|
|
url = "https://download.virtualbox.org/virtualbox/${version}/${name}";
|
2018-12-11 19:45:18 +00:00
|
|
|
sha256 =
|
|
|
|
# Manually sha256sum the extensionPack file, must be hex!
|
|
|
|
# Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
|
2019-08-09 22:29:02 +00:00
|
|
|
# Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS
|
2023-03-04 08:10:37 +00:00
|
|
|
let value = "292961aa8723b54f96f89f6d8abf7d8e29259d94b7de831dbffb9ae15d346434";
|
2018-12-11 19:45:18 +00:00
|
|
|
in assert (builtins.stringLength value) == 64; value;
|
2018-08-08 14:22:02 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Oracle Extension pack for VirtualBox";
|
|
|
|
license = licenses.virtualbox-puel;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.virtualbox.org/";
|
2019-11-28 15:18:55 +00:00
|
|
|
maintainers = with maintainers; [ sander cdepillabout ];
|
virtualbox: 5.2.28 -> 6.0.6
Quite some fixing was needed to get this to work.
Changes in VirtualBox and additions:
- VirtualBox is no longer officially supported on 32-bit hosts so i686-linux is removed from platforms
for VirtualBox and the extension pack. 32-bit additions still work.
- There was a refactoring of kernel module makefiles and two resulting bugs affected us which had to be patched.
These bugs were reported to the bug tracker (see comments near patches).
- The Qt5X11Extras makefile patch broke. Fixed it to apply again, making the libraries logic simpler
and more correct (it just uses a different base path instead of always linking to Qt5X11Extras).
- Added a patch to remove "test1" and "test2" kernel messages due to forgotten debugging code.
- virtualbox-host NixOS module: the VirtualBoxVM executable should be setuid not VirtualBox.
This matches how the official installer sets it up.
- Additions: replaced a for loop for installing kernel modules with just a "make install",
which seems to work without any of the things done in the previous code.
- Additions: The package defined buildCommand which resulted in phases not running, including RUNPATH
stripping in fixupPhase, and installPhase was defined which was not even run. Fixed this by
refactoring using phases. Had to set dontStrip otherwise binaries were broken by stripping.
The libdbus path had to be added later in fixupPhase because it is used via dlopen not directly linked.
- Additions: Added zlib and libc to patchelf, otherwise runtime library errors result from some binaries.
For some reason the missing libc only manifested itself for mount.vboxsf when included in the initrd.
Changes in nixos/tests/virtualbox:
- Update the simple-gui test to send the right keys to start the VM. With VirtualBox 5
it was enough to just send "return", but with 6 the Tools thing may be selected by
default. Send "home" to reliably select Tools, "down" to move to the VM and "return"
to start it.
- Disable the VirtualBox UART by default because it causes a crash due to a regression
in VirtualBox (specific to software virtualization and serial port usage). It can
still be enabled using an option but there is an assert that KVM nested virtualization
is enabled, which works around the problem (see below).
- Add an option to enable nested KVM virtualization, allowing VirtualBox to use hardware
virtualization. This works around the UART problem and also allows using 64-bit
guests, but requires a kernel module parameter.
- Add an option to run 64-bit guests. Tested that the tests pass with that. As mentioned
this requires KVM nested virtualization.
2019-05-04 14:18:39 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2018-08-08 14:22:02 +00:00
|
|
|
};
|
|
|
|
}
|