aboutsummaryrefslogtreecommitdiff
path: root/infra/corenix/pkgs/coreboot-payload-seabios/default.nix
{ seabios, coreboot, stdenv, fetchurl, seabiosConfig ? {
  CONFIG_COREBOOT = "y";
  CONFIG_VGA_COREBOOT = "y";
  CONFIG_BUILD_VGABIOS = "y";
} }:

seabios.overrideAttrs (oA: rec {
  pname = "coreboot-payload-seabios";

  configurePhase = ''
    runHook preConfigure
    cp ${coreboot.writeConfig seabiosConfig} .config
    make olddefconfig
    runHook postConfigure
  '';
  installPhase = ''
    install -D out/bios.bin.elf -t $out
    [ -f out/vgabios.bin ] && install -D out/vgabios.bin -t $out
  '';
})