{ stdenv, kernel, busybox, cpio }: stdenv.mkDerivation { name = "initramfs-yerba"; src = ./.; buildInputs = [ cpio ]; buildPhase = '' mkdir -p $out # Create initramfs directory structure mkdir -p initramfs/bin cp -a ${busybox}/bin/* initramfs/bin/ cp ${./initramfs_init} initramfs/init chmod +x initramfs/init cd initramfs find . | cpio -o -H newc | gzip > $out/initramfs.cpio.gz ''; }