2006-11-02 18:56:50 +01: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-04 00:41:57 +01:00
|
|
|
graftList=
|
|
|
|
sources_=($sources)
|
|
|
|
targets_=($targets)
|
|
|
|
for ((i = 0; i < ${#targets_[@]}; i++)); do
|
|
|
|
graftList="$graftList ${targets_[$i]}=$(readlink -f ${sources_[$i]})"
|
|
|
|
done
|
|
|
|
|
|
|
|
# !!! Just as with make-initrd.nix, the call to Nix here needs to be
|
|
|
|
# fixed.
|
2006-11-13 12:41:27 +01:00
|
|
|
packagesClosure=$(nix-store -qR $packages $init)
|
2006-11-04 00:41:57 +01:00
|
|
|
|
|
|
|
for i in $packagesClosure; do
|
|
|
|
graftList="$graftList ${i:1}=$i"
|
|
|
|
done
|
|
|
|
|
|
|
|
if test -n "$init"; then
|
|
|
|
ln -s $init init
|
|
|
|
graftList="$graftList init=init"
|
|
|
|
fi
|
|
|
|
|
2006-11-02 18:56:50 +01:00
|
|
|
# !!! -f is a quick hack.
|
2006-11-04 13:08:10 +01:00
|
|
|
ensureDir $out/iso
|
2006-11-04 13:08:02 +01:00
|
|
|
mkisofs -r -J -o $out/iso/$isoName $bootFlags \
|
2006-11-04 00:41:57 +01:00
|
|
|
-graft-points $graftList
|
2006-11-04 13:00:05 +01:00
|
|
|
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
echo $system > $out/nix-support/system
|