apps.nova-iso: write ISO to stdout
This commit is contained in:
parent
638f072d9b
commit
093430d8f9
|
@ -31,7 +31,7 @@ rec {
|
||||||
program = "${drv}/bin/nova-image";
|
program = "${drv}/bin/nova-image";
|
||||||
function = attrs: bootDesc:
|
function = attrs: bootDesc:
|
||||||
nixpkgs.runCommand "nova-iso" (attrs // { inherit bootDesc; })
|
nixpkgs.runCommand "nova-iso" (attrs // { inherit bootDesc; })
|
||||||
"${drv}/bin/nova-image $out $bootDesc";
|
"${drv}/bin/nova-image $bootDesc > $out";
|
||||||
};
|
};
|
||||||
|
|
||||||
nova-iso = let
|
nova-iso = let
|
||||||
|
@ -44,7 +44,7 @@ rec {
|
||||||
program = "${drv}/bin/nova-iso";
|
program = "${drv}/bin/nova-iso";
|
||||||
function = attrs: bootDesc:
|
function = attrs: bootDesc:
|
||||||
nixpkgs.runCommand "nova.iso" attrs
|
nixpkgs.runCommand "nova.iso" attrs
|
||||||
''${drv}/bin/nova-iso $out "${bootDesc}"'';
|
''${drv}/bin/nova-iso "${bootDesc}" > $out'';
|
||||||
};
|
};
|
||||||
|
|
||||||
render-init =
|
render-init =
|
||||||
|
|
|
@ -9,14 +9,6 @@ nixpkgs.writeScriptBin "nova-iso" (with nixpkgs.buildPackages;
|
||||||
#!${runtimeShell}
|
#!${runtimeShell}
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
out="$1"
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [ -e "$out" ]; then
|
|
||||||
echo "refusing to overwrite $out as output" > /dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SYSLINUX="${syslinux}/share/syslinux"
|
SYSLINUX="${syslinux}/share/syslinux"
|
||||||
|
|
||||||
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
TMPDIR="$(${coreutils}/bin/mktemp -d)"
|
||||||
|
@ -25,7 +17,8 @@ nixpkgs.writeScriptBin "nova-iso" (with nixpkgs.buildPackages;
|
||||||
mkdir -p "$TMPDIR/boot/syslinux"
|
mkdir -p "$TMPDIR/boot/syslinux"
|
||||||
${nova-image.program} "$TMPDIR/boot/image.elf" $@
|
${nova-image.program} "$TMPDIR/boot/image.elf" $@
|
||||||
|
|
||||||
pushd "$TMPDIR"
|
pushd "$TMPDIR" > /dev/null
|
||||||
|
out="nova.iso"
|
||||||
|
|
||||||
# build ISO layout
|
# build ISO layout
|
||||||
cp ${packages.NOVA}/hypervisor* boot/hypervisor
|
cp ${packages.NOVA}/hypervisor* boot/hypervisor
|
||||||
|
@ -46,5 +39,5 @@ nixpkgs.writeScriptBin "nova-iso" (with nixpkgs.buildPackages;
|
||||||
boot
|
boot
|
||||||
|
|
||||||
${syslinux}/bin/isohybrid "$out"
|
${syslinux}/bin/isohybrid "$out"
|
||||||
echo ISO is at $out
|
cat "$out"
|
||||||
'')
|
'')
|
||||||
|
|
Loading…
Reference in New Issue