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
|
|
|
|
|
|
|
|
# !!! Just as with make-initrd.nix, the call to Nix here needs to be
|
|
|
|
# fixed.
|
2006-11-13 11:41:27 +00:00
|
|
|
packagesClosure=$(nix-store -qR $packages $init)
|
2006-11-03 23:41:57 +00: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 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
|