depot/third_party/nixpkgs/pkgs/applications/virtualization/seabios/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

50 lines
1.2 KiB
Nix

{ lib, stdenv, fetchgit, acpica-tools, python3 }:
stdenv.mkDerivation rec {
pname = "seabios";
version = "1.16.1";
src = fetchgit {
url = "https://git.seabios.org/seabios.git";
rev = "rel-${version}";
sha256 = "sha256-oIl2ZbhgSiVJPMBGbVt6N074vOifAoZL6VdKcBwM8D4=";
};
nativeBuildInputs = [ python3 ];
buildInputs = [ acpica-tools ];
strictDeps = true;
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
configurePhase = ''
# build SeaBIOS for CSM
cat > .config << EOF
CONFIG_CSM=y
CONFIG_QEMU_HARDWARE=y
CONFIG_PERMIT_UNALIGNED_PCIROM=y
EOF
make olddefconfig
'';
installPhase = ''
mkdir $out
cp out/Csm16.bin $out/Csm16.bin
'';
meta = with lib; {
description = "Open source implementation of a 16bit X86 BIOS";
longDescription = ''
SeaBIOS is an open source implementation of a 16bit X86 BIOS.
It can run in an emulator or it can run natively on X86 hardware with the use of coreboot.
SeaBIOS is the default BIOS for QEMU and KVM.
'';
homepage = "http://www.seabios.org";
license = licenses.lgpl3;
maintainers = with maintainers; [ ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}