Partially revert my recent kernelPackages changes
First, pass in `self' again so that overriding works properly (thanks for pointing that out, @edolstra) Second, instead of having linuxPackages*.kernel mean something different inside the set and out, add a new attribute linuxPackages*.kernelDev, which for the generic kernel is simply linuxPackages*.kernel but for the manual-config kernel is the `dev' output (which has the build tree, source tree, etc.) The second change required trivial modifications in a bunch of expressions, I verified that all of the linuxPackages* sets defined in all-packages.nix have the same drv paths before and after the change. Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2, libX11, xproto, libXext
|
||||
, libXcursor, libXmu, qt4, libIDL, SDL, libcap, zlib, libpng, glib, kernel, lvm2
|
||||
, libXcursor, libXmu, qt4, libIDL, SDL, libcap, zlib, libpng, glib, kernelDev, lvm2
|
||||
, which, alsaLib, curl, gawk
|
||||
, xorriso, makeself, perl, pkgconfig
|
||||
, javaBindings ? false, jdk ? null
|
||||
@@ -40,7 +40,7 @@ let
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "virtualbox-${version}-${kernel.version}";
|
||||
name = "virtualbox-${version}-${kernelDev.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
|
||||
@@ -49,7 +49,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
buildInputs =
|
||||
[ iasl dev86 libxslt libxml2 xproto libX11 libXext libXcursor qt4 libIDL SDL
|
||||
libcap glib kernel lvm2 python alsaLib curl pam xorriso makeself perl
|
||||
libcap glib kernelDev lvm2 python alsaLib curl pam xorriso makeself perl
|
||||
pkgconfig which libXmu ]
|
||||
++ optional javaBindings jdk
|
||||
++ optional pythonBindings python;
|
||||
@@ -61,7 +61,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
prePatch = ''
|
||||
set -x
|
||||
MODULES_BUILD_DIR=`echo ${kernel}/lib/modules/*/build`
|
||||
MODULES_BUILD_DIR=`echo ${kernelDev}/lib/modules/*/build`
|
||||
sed -e 's@/lib/modules/`uname -r`/build@'$MODULES_BUILD_DIR@ \
|
||||
-e 's@MKISOFS --version@MKISOFS -version@' \
|
||||
-e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{ stdenv, fetchurl, lib, patchelf, cdrkit, kernel, which, makeWrapper
|
||||
{ stdenv, fetchurl, lib, patchelf, cdrkit, kernelDev, which, makeWrapper
|
||||
, libX11, libXt, libXext, libXmu, libXcomposite, libXfixes, libXrandr, libXcursor
|
||||
, dbus }:
|
||||
|
||||
let version = "4.2.8"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "VirtualBox-GuestAdditions-${version}-${kernel.version}";
|
||||
name = "VirtualBox-GuestAdditions-${version}-${kernelDev.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
|
||||
sha256 = "04a5402d8dcdefc83ffb2785351ddc57758781a3759137974469189392ae4ad5";
|
||||
};
|
||||
|
||||
KERN_DIR = "${kernel}/lib/modules/*/build";
|
||||
KERN_DIR = "${kernelDev}/lib/modules/*/build";
|
||||
|
||||
buildInputs = [ patchelf cdrkit makeWrapper dbus ];
|
||||
|
||||
@@ -112,7 +112,7 @@ stdenv.mkDerivation {
|
||||
for i in *
|
||||
do
|
||||
cd $i
|
||||
kernelVersion=$(cd ${kernel}/lib/modules; ls)
|
||||
kernelVersion=$(cd ${kernelDev}/lib/modules; ls)
|
||||
export MODULE_DIR=$out/lib/modules/$kernelVersion/misc
|
||||
find . -type f | xargs sed -i -e "s|-o root||g" \
|
||||
-e "s|-g root||g"
|
||||
|
||||
Reference in New Issue
Block a user