aboutsummaryrefslogtreecommitdiff
path: root/pkgs/coreboot-payload-seabios/default.nix
blob: f2b1ee3b6021094a52e040080f89146c0dd6f998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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
  '';
})