aboutsummaryrefslogtreecommitdiff
path: root/nix/busybox.nix
blob: 04d1a3676efd4cf4fbf9445cc56568ed8ae3b930 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, pkgsStatic }:

stdenv.mkDerivation {
	name = "busybox-yerba";
	buildCommand = ''
		mkdir -p $out/_install/bin $out/_install/sbin

		cp ${pkgsStatic.busybox}/bin/busybox $out/_install/bin
		chmod +x $out/_install/bin/busybox

		cd $out/_install/bin 
		for prog in $(./busybox --list); do
			ln -s busybox $prog 
		done


		cd $out/_install/sbin
		for prog in $(./busybox --list); do
			ln -s ../bin/busybox $prog 
		done
	'';
}