From a2f33a4b895e00d9fd9d0b2b035f1d1103f606f3 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 30 Sep 2024 12:19:54 -0300 Subject: [PATCH] seabios: nixfmt-rfc-style --- pkgs/by-name/se/seabios/package.nix | 56 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/se/seabios/package.nix b/pkgs/by-name/se/seabios/package.nix index 713f58702113..9c06b7cf753e 100644 --- a/pkgs/by-name/se/seabios/package.nix +++ b/pkgs/by-name/se/seabios/package.nix @@ -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 ]; }; })