VirtualBox-GuestAdditions: Add to the channel

This commit is contained in:
Eelco Dolstra 2012-08-14 13:43:37 -04:00
parent 9d516f16fc
commit c67c397c11
1 changed files with 32 additions and 31 deletions

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation {
${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
./VBoxLinuxAdditions.run --noexec --keep ./VBoxLinuxAdditions.run --noexec --keep
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
} }
@ -44,10 +44,10 @@ stdenv.mkDerivation {
for i in * for i in *
do do
cd $i cd $i
find . -type f | xargs sed 's/depmod -a/true/' -i find . -type f | xargs sed 's/depmod -a/true/' -i
make make
cd .. cd ..
done done
cd .. cd ..
@ -57,12 +57,12 @@ stdenv.mkDerivation {
do do
${if stdenv.system == "i686-linux" then '' ${if stdenv.system == "i686-linux" then ''
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $i patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $i
'' ''
else if stdenv.system == "x86_64-linux" then '' else if stdenv.system == "x86_64-linux" then ''
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $i patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $i
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
} }
done done
# Change rpath for various binaries and libraries # Change rpath for various binaries and libraries
@ -103,7 +103,7 @@ stdenv.mkDerivation {
mkdir -p $out/lib/xorg/modules/{drivers,input} mkdir -p $out/lib/xorg/modules/{drivers,input}
install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_19.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so install -m 644 lib/VBoxGuestAdditions/vboxvideo_drv_19.so $out/lib/xorg/modules/drivers/vboxvideo_drv.so
# There doesn't appear to be a vboxmouse driver for Xorg 1.9. Was there ever? # There doesn't appear to be a vboxmouse driver for Xorg 1.9. Was there ever?
# install -m 644 lib/VBoxGuestAdditions/vboxmouse_drv_19.so $out/lib/xorg/modules/input/vboxmouse_drv.so #install -m 644 lib/VBoxGuestAdditions/vboxmouse_drv_19.so $out/lib/xorg/modules/input/vboxmouse_drv.so
# Install kernel modules # Install kernel modules
cd src cd src
@ -111,14 +111,14 @@ stdenv.mkDerivation {
for i in * for i in *
do do
cd $i cd $i
kernelVersion=$(cd ${kernel}/lib/modules; ls) kernelVersion=$(cd ${kernel}/lib/modules; ls)
export MODULE_DIR=$out/lib/modules/$kernelVersion/misc export MODULE_DIR=$out/lib/modules/$kernelVersion/misc
find . -type f | xargs sed -i -e "s|-o root||g" \ find . -type f | xargs sed -i -e "s|-o root||g" \
-e "s|-g root||g" -e "s|-g root||g"
make install make install
cd .. cd ..
done done
''; ''; # */
meta = { meta = {
description = "Guest additions for VirtualBox"; description = "Guest additions for VirtualBox";
@ -129,5 +129,6 @@ stdenv.mkDerivation {
''; '';
license = "GPL"; license = "GPL";
maintainers = [ lib.maintainers.sander ]; maintainers = [ lib.maintainers.sander ];
platforms = lib.platforms.linux;
}; };
} }