2010-03-09 22:44:45 +00:00
|
|
|
{stdenv, fetchurl, enableStatic ? false}:
|
2010-03-09 22:17:38 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
basicConfigure = ''
|
|
|
|
make defconfig
|
|
|
|
sed -i 's,.*CONFIG_PREFIX.*,CONFIG_PREFIX="'$out'",' .config
|
|
|
|
sed -i 's,.*CONFIG_INSTALL_NO_USR.*,CONFIG_INSTALL_NO_USR=y,' .config
|
2010-03-09 22:44:45 +00:00
|
|
|
'' +
|
|
|
|
(if enableStatic then ''
|
|
|
|
sed -i 's,.*CONFIG_STATIC.*,CONFIG_STATIC=y,' .config
|
|
|
|
'' else "");
|
2010-03-09 22:17:38 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "busybox-1.16.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://busybox.net/downloads/busybox-1.16.0.tar.bz2;
|
|
|
|
sha256 = "1n738zk01yi2sjrx2y36hpzxbslas8b91vzykcifr0p1j7ym0lim";
|
|
|
|
};
|
|
|
|
|
|
|
|
configurePhase = basicConfigure;
|
|
|
|
|
|
|
|
crossAttrs = {
|
|
|
|
configurePhase = basicConfigure + ''
|
|
|
|
sed -i 's,.*CONFIG_CROSS_COMPILER_PREFIX.*,CONFIG_CROSS_COMPILER_PREFIX="'$crossConfig-'",' .config
|
2010-03-10 21:32:35 +00:00
|
|
|
'' +
|
|
|
|
(if (stdenv.cross.platform.kernelMajor == "2.4") then ''
|
|
|
|
sed -i 's,.*CONFIG_IONICE.*,CONFIG_IONICE=n,' .config
|
|
|
|
'' else "");
|
2010-03-09 22:17:38 +00:00
|
|
|
};
|
|
|
|
}
|