nixpkgs/pkgs/misc/busybox/default.nix
Lluís Batlle i Rossell fb6adb13ac Updating busybox. I left only a single busybox in its directory. The others, coming from the old
cross-building nixpkgs implementation, were not referenced anywhere.

This new busybox builds natively, and also cross-builds with uclibc.

I updated the uclibc config with a busybox defconfig requirement (something about RPC).

I made the gcc-cross-wrapper properly set the dynamic loader to programs.

After this, 'qemu-arm' can run the dynamically linked busybox cross built for armv5tel--linux-gnueabi.



svn path=/nixpkgs/trunk/; revision=20514
2010-03-09 22:17:38 +00:00

28 lines
638 B
Nix

{stdenv, fetchurl}:
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
'';
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
'';
};
}