better layout, make sure we can differentiate between different configurations

svn path=/nixpkgs/trunk/; revision=4465
This commit is contained in:
Armijn Hemel 2005-12-31 14:10:20 +00:00
parent 2f3dfaa5b9
commit bfcb644bb4
2 changed files with 11 additions and 5 deletions

View File

@ -4,6 +4,7 @@ preBuild=preBuild
preBuild() {
cp $config .config
makeFlags="CROSS=$cross-";
}
genericBuild

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, gcc40arm, kernelHeadersArm, binutilsArm}:
{stdenv, fetchurl, gccCross, kernelHeadersCross, binutilsCross, cross}:
stdenv.mkDerivation {
builder = ./builder.sh;
@ -7,8 +7,13 @@ stdenv.mkDerivation {
url = http://www.uclibc.org/downloads/uClibc-0.9.28.tar.bz2;
md5 = "1ada58d919a82561061e4741fb6abd29";
};
config = ./config;
inherit kernelHeadersArm;
buildInputs = [gcc40arm binutilsArm];
makeFlags="CROSS=arm-linux-";
config = if cross == "mips-linux"
then ./config-mips-linux
else if cross == "arm-linux"
then ./config-arm-linux
else "";
inherit kernelHeadersCross;
buildInputs = [gccCross binutilsCross];
inherit cross;
}