From 12ee0fbd8883cb5a17b499c42c8d6cdf602d1640 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 4 Jul 2017 20:04:45 +0200 Subject: virtualbox: Add patch for Linux 4.12 Compiling the kernel modules on Linux 4.12 fails, so I've included an upstream patch from: https://www.virtualbox.org/changeset/66927/vbox The patch is applied against the guest additions as well, where we need to transform the patch a bit so that we get CR LF line endings (DOS format), which is what is the case for the guest additions ISO. I've tested this with all the subtests of the "virtualbox" NixOS VM tests and they all succeed on x86_64-linux. Signed-off-by: aszlig --- .../applications/virtualization/virtualbox/guest-additions/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/applications/virtualization/virtualbox/guest-additions') diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 3c9f28f4f2d5..8865022c23e4 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -62,6 +62,9 @@ stdenv.mkDerivation { for i in * do cd $i + # Files within the guest additions ISO are using DOS line endings + sed -re '/^(@@|---|\+\+\+)/!s/$/\r/' ${../linux-4.12.patch} \ + | patch -d vboxguest -p4 find . -type f | xargs sed 's/depmod -a/true/' -i make cd .. -- cgit 1.4.1