3
0
Fork 0
forked from mirrors/nixpkgs

* VirtualBox: drop the unnecessary dependency on HAL.

svn path=/nixpkgs/trunk/; revision=32745
This commit is contained in:
Eelco Dolstra 2012-03-02 14:54:14 +00:00
parent 15e5aead3d
commit 000051b196

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2, libX11, xproto, libXext { stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2, libX11, xproto, libXext
, libXcursor, libXmu, qt4, libIDL, SDL, hal, libcap, zlib, libpng, glib, kernel , libXcursor, libXmu, qt4, libIDL, SDL, libcap, zlib, libpng, glib, kernel
, python, which, alsaLib, curl, gawk , python, which, alsaLib, curl, gawk
, xorriso, makeself, perl, jdk, pkgconfig , xorriso, makeself, perl, jdk, pkgconfig
}: }:
@ -16,7 +16,7 @@ stdenv.mkDerivation {
buildInputs = buildInputs =
[ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor qt4 libIDL SDL [ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor qt4 libIDL SDL
hal libcap glib kernel python alsaLib curl pam xorriso makeself perl jdk libcap glib kernel python alsaLib curl pam xorriso makeself perl jdk
pkgconfig which libXmu pkgconfig which libXmu
]; ];
@ -49,19 +49,23 @@ stdenv.mkDerivation {
echo "VBOX_WITH_WARNINGS_AS_ERRORS :=" >> LocalConfig.kmk echo "VBOX_WITH_WARNINGS_AS_ERRORS :=" >> LocalConfig.kmk
''; '';
buildPhase = '' enableParallelBuilding = true;
preBuild = ''
source env.sh source env.sh
kmk kmk
cd out/linux.*/release/bin/src cd out/linux.*/release/bin/src
export KERN_DIR=${kernel}/lib/modules/*/build export KERN_DIR=${kernel}/lib/modules/*/build
make '';
postBuild = ''
cd ../../../../.. cd ../../../../..
''; '';
installPhase = '' installPhase = ''
# Install VirtualBox files # Install VirtualBox files
cd out/linux.*/release/bin cd out/linux.*/release/bin
ensureDir $out/virtualbox mkdir -p $out/virtualbox
cp -av * $out/virtualbox cp -av * $out/virtualbox
# Install kernel module # Install kernel module
@ -80,7 +84,7 @@ stdenv.mkDerivation {
make install make install
# Create wrapper script # Create wrapper script
ensureDir $out/bin mkdir -p $out/bin
cp -v ${./VBox.sh} $out/bin/VBox.sh cp -v ${./VBox.sh} $out/bin/VBox.sh
sed -i -e "s|@INSTALL_PATH@|$out/virtualbox|" \ sed -i -e "s|@INSTALL_PATH@|$out/virtualbox|" \
-e "s|@QT4_PATH@|${qt4}/lib|" \ -e "s|@QT4_PATH@|${qt4}/lib|" \
@ -94,7 +98,7 @@ stdenv.mkDerivation {
done done
# Create and fix desktop item # Create and fix desktop item
ensureDir $out/share/applications mkdir -p $out/share/applications
sed -i -e "s|Icon=VBox|Icon=$out/virtualbox/VBox.png|" $out/virtualbox/virtualbox.desktop sed -i -e "s|Icon=VBox|Icon=$out/virtualbox/VBox.png|" $out/virtualbox/virtualbox.desktop
ln -sfv $out/virtualbox/virtualbox.desktop $out/share/applications ln -sfv $out/virtualbox/virtualbox.desktop $out/share/applications
''; '';