package rosa-stage0 {
	description = "Rosa OS stage0 bootstrap seed";
	version = unversioned;
	exclude = true;

	source = hakurei-source;
	extra = [
		llvm,
		mksh,
		toybox-early,
	];
	overlay = "/stage0";
	exec = generic {
		build = `
umask 377
tar -vc -C /stage0 . | \
	zstd -19 -T`+jobsE+` > \
	/work/stage0-`+triple+`.tar.zst
`;
	};

	inputs = [ zstd ];
}

package stage0-dist {
	description = "Rosa OS stage0 bootstrap seed (binary distribution)";
	exclude = true;

	version# = "20260723";
	output = remoteTar {
		url = "https://hakurei.app/seed/"+version+"/"+
			"stage0-"+triple+".tar.zst";
		checksum = arch {
			amd64 = "wG8FZoBqpiLNQlT4n7G4uuwFILZPxs_Sf_TQwjvxbS3qNJq8EntGLfMO4sikb1GE";
			arm64 = "iew97r0y9BgKyeDd5ih2Z-YkR6lh-RjqwYvcVo4XMLBiKHgaZPBMLSmxxVq5YQuv";
			riscv64 = "NrmC5PtDnr3tY2aVNReorqmYUj29F7PKXsDfWBxvUJfawKzQiDSCURu5HsVmEzsS";

			default = 0;
		};
		compress = zstd;
	};
}
