Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1017B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. { stdenv, nixpkgs, packages, nova-image }:
  2. nixpkgs.writeScriptBin "nova-iso" (with nixpkgs.buildPackages;
  3. let inherit (stdenv) cc;
  4. in ''
  5. #!${runtimeShell}
  6. set -eu
  7. SYSLINUX="${syslinux}/share/syslinux"
  8. TMPDIR="$(${coreutils}/bin/mktemp -d)"
  9. trap "rm -rf $TMPDIR" err exit
  10. mkdir -p "$TMPDIR/boot/syslinux"
  11. ${nova-image.program} $@ > "$TMPDIR/boot/image.elf"
  12. pushd "$TMPDIR" > /dev/null
  13. out="nova.iso"
  14. # build ISO layout
  15. cp ${packages.NOVA}/hypervisor* boot/hypervisor
  16. cp ${./isolinux.cfg} boot/syslinux/isolinux.cfg
  17. cp \
  18. $SYSLINUX/isolinux.bin \
  19. $SYSLINUX/ldlinux.c32 \
  20. $SYSLINUX/libcom32.c32 \
  21. $SYSLINUX/mboot.c32 \
  22. boot/syslinux
  23. chmod +w boot/syslinux/isolinux.bin
  24. # create ISO image
  25. ${cdrkit}/bin/mkisofs -o "$out" \
  26. -b syslinux/isolinux.bin -c syslinux/boot.cat \
  27. -no-emul-boot -boot-load-size 4 -boot-info-table \
  28. -iso-level 2 \
  29. boot
  30. ${syslinux}/bin/isohybrid "$out"
  31. cat "$out"
  32. '')