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

	source = hakurei-source
	extra = [
		llvm
		mksh
		toybox-early
	]
	overlay = "/stage0"
	exec = generic {
		build = `umask 377
		         tar -vjc -C /stage0 -f /work/stage0-${triple}.tar.bz2 .`
	}

	inputs = [ bzip2 ]
}

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

	version# = "20260504"
	output = remoteTar {
		url = "https://hakurei.app/seed/${version}/stage0-${triple}.tar.bz2"
		checksum = arch {
			amd64 = "IQjFDkiAVLo1XzflgMMiLP3gnVY2hhDMTzl-QqJDCQhcLQ3lLtRzjI5WCxGyW_lk"
			arm64 = "6fmwl2Umx2QssKQvxxb1JOGkAjzfA_MXKku0jVdGjYGb35OvwEVA5NYtd0HIy3yH"
			riscv64 = "Z2ODV0rIoo9iQRUIu35bsaOBeXc_9qQfGcyb2aGneatzNUJlXh5emSpEV2bOklUL"

			default = 0
		}
		compress = bzip2
	}
}
