about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2019-09-24 00:45:13 +0200
committeraszlig <aszlig@nix.build>2019-09-24 00:55:22 +0200
commitc11d43c59fe3c82ebb17df1e592cce3fff0816c1 (patch)
tree3e68c3aadc7ff42fd3a87bdc9a1c24aed8c9bb85
parentdbfb6e17e01136d6756bffb82bc1406782989bd0 (diff)
devhell/profiles: Fix VirtualBox kernel 5.3 build
This uses a patch from Arch Linux to fix the build of the VirtualBox
kernel modules for Linux 5.3. I didn't do any testing of this other than
just to build the modules with the fix.

The override here is to be reverted as soon as we got a fix for this in
upstream nixpkgs. I didn't do this yet by myself, because I *really*
should get back to work right now...

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @devhell
-rw-r--r--modules/user/devhell/profiles/services.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/user/devhell/profiles/services.nix b/modules/user/devhell/profiles/services.nix
index 927fa3e9..213e1fb0 100644
--- a/modules/user/devhell/profiles/services.nix
+++ b/modules/user/devhell/profiles/services.nix
@@ -14,6 +14,17 @@ in {
         host = {
           enable = true;
           enableHardening = false;
+
+          # TODO: Upstream to nixpkgs and remove this afterwards.
+          package = pkgs.virtualbox.overrideAttrs (drv: {
+            patches = (drv.patches or []) ++ lib.singleton (pkgs.fetchpatch {
+              name = "virtualbox-linux-5.3.patch";
+              url = "https://git.archlinux.org/svntogit/community.git/plain/"
+                  + "virtualbox/trunk/015-linux-5-3.patch"
+                  + "?id=bd69d43ad87dc49e703c8e86d09ab31f2bd0e021";
+              sha256 = "0gsa0lrhpfn9yvf1hzbx0gxz9ls213v6gallzj6a2dj83r0llic0";
+            });
+          });
         };
       };
       libvirtd = {