seabios: nixfmt-rfc-style

This commit is contained in:
Anderson Torres
2024-10-02 18:59:19 -03:00
parent b12b45ea63
commit a2f33a4b89
+33 -23
View File
@@ -1,9 +1,10 @@
{ lib
, stdenv
, fetchgit
, acpica-tools
, python3
, writeText
{
lib,
acpica-tools,
fetchgit,
python3,
stdenv,
writeText,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -16,7 +17,10 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-hWemj83cxdY8p+Jhkh5GcPvI0Sy5aKYZJCsKDjHTUUk=";
};
outputs = [ "out" "doc" ];
outputs = [
"out"
"doc"
];
nativeBuildInputs = [ python3 ];
@@ -29,20 +33,28 @@ stdenv.mkDerivation (finalAttrs: {
"EXTRAVERSION=\"-nixpkgs\""
];
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
hardeningDisable = [
"fortify"
"pic"
"stackprotector"
];
postConfigure = let
config = writeText "config.txt" (lib.generators.toKeyValue { } {
# SeaBIOS with CSM (Compatible Support Module) support; learn more at
# https://www.electronicshub.org/what-is-csm-bios/
"CONFIG_CSM" = "y";
"CONFIG_PERMIT_UNALIGNED_PCIROM" = "y";
"CONFIG_QEMU_HARDWARE" = "y";
});
in ''
cp ${config} .config
make olddefconfig
'';
postConfigure =
let
config = writeText "config.txt" (
lib.generators.toKeyValue { } {
# SeaBIOS with CSM (Compatible Support Module) support; learn more at
# https://www.electronicshub.org/what-is-csm-bios/
"CONFIG_CSM" = "y";
"CONFIG_PERMIT_UNALIGNED_PCIROM" = "y";
"CONFIG_QEMU_HARDWARE" = "y";
}
);
in
''
cp ${config} .config
make olddefconfig
'';
installPhase = ''
runHook preInstall
@@ -64,9 +76,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
license = with lib.licenses; [ lgpl3Plus ];
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.systems.inspect.patternLogicalAnd
lib.systems.inspect.patterns.isUnix
lib.systems.inspect.patterns.isx86;
platforms = lib.systems.inspect.patternLogicalAnd lib.systems.inspect.patterns.isUnix lib.systems.inspect.patterns.isx86;
badPlatforms = [ lib.systems.inspect.patterns.isDarwin ];
};
})