virtualbox: make guest additions use driver according to xserver version
This commit is contained in:
parent
43c9ab900b
commit
45f7b9c319
@ -1,8 +1,11 @@
|
|||||||
{ stdenv, fetchurl, lib, patchelf, cdrkit, kernelDev, which, makeWrapper
|
{ stdenv, fetchurl, lib, patchelf, cdrkit, kernelDev, which, makeWrapper
|
||||||
, libX11, libXt, libXext, libXmu, libXcomposite, libXfixes, libXrandr, libXcursor
|
, xorg, dbus }:
|
||||||
, dbus }:
|
|
||||||
|
|
||||||
let version = "4.2.12"; in
|
let
|
||||||
|
version = "4.2.12";
|
||||||
|
xserverVListFunc = builtins.elemAt (stdenv.lib.splitString "." xorg.xorgserver.version);
|
||||||
|
xserverABI = xserverVListFunc 0 + xserverVListFunc 1;
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "VirtualBox-GuestAdditions-${version}-${kernelDev.version}";
|
name = "VirtualBox-GuestAdditions-${version}-${kernelDev.version}";
|
||||||
@ -22,7 +25,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = with xorg; ''
|
||||||
${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
|
${if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
|
||||||
isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run
|
isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run
|
||||||
chmod 755 ./VBoxLinuxAdditions.run
|
chmod 755 ./VBoxLinuxAdditions.run
|
||||||
@ -104,7 +107,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
# Install Xorg drivers
|
# Install Xorg drivers
|
||||||
mkdir -p $out/lib/xorg/modules/{drivers,input}
|
mkdir -p $out/lib/xorg/modules/{drivers,input}
|
||||||
install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_113.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so
|
install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_${xserverABI}.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so
|
||||||
|
|
||||||
# Install kernel modules
|
# Install kernel modules
|
||||||
cd src
|
cd src
|
||||||
|
@ -209,6 +209,7 @@ in
|
|||||||
rm -fr $out/share/X11/xkb/compiled
|
rm -fr $out/share/X11/xkb/compiled
|
||||||
ln -s /var/tmp $out/share/X11/xkb/compiled
|
ln -s /var/tmp $out/share/X11/xkb/compiled
|
||||||
'';
|
'';
|
||||||
|
passthru.version = (builtins.parseDrvName attrs.name).version; # needed by virtualbox guest additions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user