aboutsummaryrefslogtreecommitdiff
path: root/nix/initramfs.nix
blob: 5d023c43e33953d929f158d23e111191ea0a863f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ stdenv, kernel, busybox, cpio }:

stdenv.mkDerivation {
	name = "initramfs-yerba";
	src = ./.;
	buildInputs = [ cpio ];
	buildPhase = ''
		mkdir -p initramfs/bin
		cp -a ${busybox}/_install/* initramfs/
		cp ${../initramfs_init} initramfs/init
		chmod +x initramfs/init
		cd initramfs
		find . | cpio -o -H newc | gzip > $out
	'';
	installPhase = ''
		echo "initramfs built"
	'';
}