From a27f12009e4c7eda51a83d0859640bb4bc09ddb8 Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Fri, 24 Apr 2026 16:33:55 +0200 Subject: [PATCH 1/2] acpica-tools: fix build on aarch64-darwin --- pkgs/by-name/ac/acpica-tools/package.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ac/acpica-tools/package.nix b/pkgs/by-name/ac/acpica-tools/package.nix index 5cf7ae30268d..c6027ed0ae27 100644 --- a/pkgs/by-name/ac/acpica-tools/package.nix +++ b/pkgs/by-name/ac/acpica-tools/package.nix @@ -39,6 +39,13 @@ stdenv.mkDerivation (finalAttrs: { "-O3" ]; + # ACPICA emits packed structs that produce unaligned pointers. Apple's + # arm64 linker rejects these under chained fixups; opt back into the + # legacy fixup format so the link succeeds. + NIX_LDFLAGS = lib.optionalString ( + stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 + ) "-no_fixup_chains"; + # i686 builds fail with hardening enabled (due to -Wformat-overflow). Disable # -Werror altogether to make this derivation less fragile to toolchain # updates. @@ -46,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: { # We can handle stripping ourselves. # Unless we are on Darwin. Upstream makefiles degrade coreutils install to cp if _APPLE is detected. - INSTALLFLAGS = lib.optionals (!stdenv.hostPlatform.isDarwin) "-m 555"; + INSTALLFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-m 555"; }; enableParallelBuilding = true; From 85e0d4ddff0b8ef99b0c6291f626934e7ef0f3ce Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Fri, 24 Apr 2026 16:35:01 +0200 Subject: [PATCH 2/2] OVMFFull: fix build on aarch64-darwin --- pkgs/applications/virtualization/OVMF/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 9030799195bb..8435e824b843 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -274,6 +274,5 @@ edk2.mkDerivation projectDscPath (finalAttrs: { mjoerg sigmasquadron ]; - broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; }; })