2006-11-02 18:56:50 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
2007-01-23 14:44:41 +01:00
|
|
|
sources_=($sources)
|
|
|
|
targets_=($targets)
|
|
|
|
|
|
|
|
objects=($objects)
|
|
|
|
symlinks=($symlinks)
|
|
|
|
|
|
|
|
|
2006-11-02 18:56:50 +01:00
|
|
|
if test -n "$bootable"; then
|
|
|
|
bootFlags="-b $bootImage -c boot.cat -no-emul-boot -boot-load-size 4"
|
|
|
|
fi
|
|
|
|
|
2007-01-23 14:44:41 +01:00
|
|
|
|
2007-01-23 15:34:44 +01:00
|
|
|
# Add the individual files.
|
2006-11-04 00:41:57 +01:00
|
|
|
graftList=
|
|
|
|
for ((i = 0; i < ${#targets_[@]}; i++)); do
|
|
|
|
graftList="$graftList ${targets_[$i]}=$(readlink -f ${sources_[$i]})"
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2007-01-23 15:34:44 +01:00
|
|
|
# Add the closures of the top-level store objects.
|
|
|
|
storePaths=$(perl $pathsFromGraph closure-*)
|
|
|
|
for i in $storePaths; do
|
|
|
|
graftList="$graftList ${i:1}=$i"
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
# Add symlinks to the top-level store objects.
|
2007-01-23 14:44:41 +01:00
|
|
|
for ((n = 0; n < ${#objects[*]}; n++)); do
|
|
|
|
object=${objects[$n]}
|
|
|
|
symlink=${symlinks[$n]}
|
|
|
|
if test "$symlink" != "none"; then
|
|
|
|
mkdir -p $(dirname ./$symlink)
|
|
|
|
ln -s $object ./$symlink
|
|
|
|
graftList="$graftList $symlink=./$symlink"
|
|
|
|
fi
|
2006-11-04 00:41:57 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
|
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
|