{ coreboot, lib, stdenv, writeText, coreinfoConfig ? { } }: stdenv.mkDerivation rec { pname = "coreboot-payload-coreinfo"; inherit (coreboot.drvAttrs) version src postPatch; preConfigure = "cd payloads/coreinfo"; configurePhase = '' runHook preConfigure cp ${coreboot.writeConfig coreinfoConfig} .config make olddefconfig runHook postConfigure ''; installPhase = "install -D build/coreinfo.elf -t $out"; }