2006-11-02 17:56:50 +00:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
if test -n "$bootable"; then
|
|
|
|
bootFlags="-b $bootImage -c boot.cat -no-emul-boot -boot-load-size 4"
|
|
|
|
fi
|
|
|
|
|
2006-11-03 23:41:57 +00:00
|
|
|
graftList=
|
|
|
|
sources_=($sources)
|
|
|
|
targets_=($targets)
|
|
|
|
for ((i = 0; i < ${#targets_[@]}; i++)); do
|
|
|
|
graftList="$graftList ${targets_[$i]}=$(readlink -f ${sources_[$i]})"
|
|
|
|
done
|
|
|
|
|
2006-11-17 14:13:21 +00:00
|
|
|
storePaths=$($SHELL $pathsFromGraph ./init-closure)
|
2006-11-03 23:41:57 +00:00
|
|
|
|
2006-11-17 14:13:21 +00:00
|
|
|
for i in $storePaths; do
|
2006-11-03 23:41:57 +00:00
|
|
|
graftList="$graftList ${i:1}=$i"
|
|
|
|
done
|
|
|
|
|
|
|
|
if test -n "$init"; then
|
|
|
|
ln -s $init init
|
|
|
|
graftList="$graftList init=init"
|
|
|
|
fi
|
|
|
|
|
2006-11-02 17:56:50 +00:00
|
|
|
# !!! -f is a quick hack.
|
2006-11-04 12:08:10 +00:00
|
|
|
ensureDir $out/iso
|
2006-11-04 12:08:02 +00:00
|
|
|
mkisofs -r -J -o $out/iso/$isoName $bootFlags \
|
2006-11-03 23:41:57 +00:00
|
|
|
-graft-points $graftList
|
2006-11-04 12:00:05 +00:00
|
|
|
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
echo $system > $out/nix-support/system
|