The Nixos Qemu VM that are used for VM tests can now start without boot menu even when using a bootloader. The Nixos Qemu VM with bootloader can emulate a EFI boot now.
···11+{ stdenv, fetchurl, iasl, python }:
22+33+stdenv.mkDerivation rec {
44+55+ name = "seabios-${version}";
66+ version = "1.7.5.2";
77+88+ src = fetchurl {
99+ url = "http://code.coreboot.org/p/seabios/downloads/get/${name}.tar.gz";
1010+ sha256 = "1syd3gi5gq0gj2pjvmdis64xc3j1xf0jgy49ngymap0pdpm0cmh0";
1111+ };
1212+1313+ buildInputs = [ iasl python ];
1414+1515+ configurePhase = ''
1616+ # build SeaBIOS for CSM
1717+ cat > .config << EOF
1818+ CONFIG_CSM=y
1919+ CONFIG_QEMU_HARDWARE=y
2020+ CONFIG_PERMIT_UNALIGNED_PCIROM=y
2121+ EOF
2222+2323+ make olddefconfig
2424+ '';
2525+2626+ installPhase = ''
2727+ mkdir $out
2828+ cp out/Csm16.bin $out/Csm16.bin
2929+ '';
3030+3131+ meta = with stdenv.lib; {
3232+ description = "Open source implementation of a 16bit X86 BIOS";
3333+ longDescription = ''
3434+ SeaBIOS is an open source implementation of a 16bit X86 BIOS.
3535+ It can run in an emulator or it can run natively on X86 hardware with the use of coreboot.
3636+ SeaBIOS is the default BIOS for QEMU and KVM.
3737+ '';
3838+ homepage = http://www.seabios.org;
3939+ license = licenses.lgpl3;
4040+ maintainers = [ maintainers.tstrobel ];
4141+ platforms = platforms.linux;
4242+ };
4343+}
4444+