Trying to make uboot not annoy the nixpkgs tarball. Tested.

svn path=/nixpkgs/trunk/; revision=20310
This commit is contained in:
Lluís Batlle i Rossell 2010-03-01 15:21:24 +00:00
parent 7869d22938
commit 95e22a39c7

View File

@ -1,5 +1,7 @@
{stdenv, fetchurl, unzip, platform}: {stdenv, fetchurl, unzip, platform}:
# This does not cover the case for cross-building, but we need some filtering
# for the normal stdenv, in order to build the nixpkgs tarball
assert (stdenv.system != "i686-linux" && stdenv.system != "x86_64-linux") assert (stdenv.system != "i686-linux" && stdenv.system != "x86_64-linux")
|| (stdenv ? cross); || (stdenv ? cross);
@ -14,20 +16,22 @@ stdenv.mkDerivation {
# patches = [ ./gas220.patch ]; # patches = [ ./gas220.patch ];
# Remove the cross compiler prefix, and add reiserfs support # Remove the cross compiler prefix, and add reiserfs support
configurePhase = '' configurePhase = assert (platform ? ubootConfig);
make mrproper ''
make ${platform.ubootConfig} NBOOT=1 LE=1 make mrproper
sed -i /CROSS_COMPILE/d include/config.mk make ${platform.ubootConfig} NBOOT=1 LE=1
''; sed -i /CROSS_COMPILE/d include/config.mk
'';
buildPhase = '' buildPhase = assert (platform ? kernelArch);
unset src ''
if test -z "$crossConfig"; then unset src
make clean all if test -z "$crossConfig"; then
else make clean all
make clean all ARCH=${platform.kernelArch} CROSS_COMPILE=$crossConfig- else
fi make clean all ARCH=${platform.kernelArch} CROSS_COMPILE=$crossConfig-
''; fi
'';
buildNativeInputs = [ unzip ]; buildNativeInputs = [ unzip ];