mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
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
|
||||
, libX11, libXt, libXext, libXmu, libXcomposite, libXfixes, libXrandr, libXcursor
|
||||
, dbus }:
|
||||
, xorg, 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 {
|
||||
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 ''
|
||||
isoinfo -J -i $src -x /VBoxLinuxAdditions.run > ./VBoxLinuxAdditions.run
|
||||
chmod 755 ./VBoxLinuxAdditions.run
|
||||
@ -104,7 +107,7 @@ stdenv.mkDerivation {
|
||||
|
||||
# Install Xorg drivers
|
||||
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
|
||||
cd src
|
||||
|
@ -209,6 +209,7 @@ in
|
||||
rm -fr $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…
Reference in New Issue
Block a user