From ca9f272bf96770ff1b5b75b8ffcf56b74025e1ba Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 23 Mar 2026 17:58:24 +0100 Subject: [PATCH 1/2] {luajit,luajit_2_0,luajit_openresty}: Add powerpc64-linux to unsupported platforms Official LuaJIT throws same error on powerpc64 as it does on powerpc64le. --- pkgs/development/interpreters/luajit/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 2df24afc2fa3..91c706e4efa8 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -172,7 +172,9 @@ stdenv.mkDerivation (finalAttrs: { badPlatforms = [ "loongarch64-linux" # See https://github.com/LuaJIT/LuaJIT/issues/1278 "riscv64-linux" # See https://github.com/LuaJIT/LuaJIT/issues/628 - "powerpc64le-linux" # `#error "No support for PPC64"` + # `#error "No support for PPC64"` + "powerpc64-linux" + "powerpc64le-linux" ]; mainProgram = "lua"; maintainers = with lib.maintainers; [ From f15c217e4a08bfa6ecbaec8e3d4fa2778a5e25b9 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 23 Mar 2026 18:33:00 +0100 Subject: [PATCH 2/2] luajit_openresty: Remove powerpc64le-linux from badPlatforms powerpc64 and powerpc64le are supported since at least 2.1-20201001. powerpc64 ELFv1 (our default ABI target) builds, but suffers from an issue with memory allocations. --- pkgs/development/interpreters/luajit/openresty.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/interpreters/luajit/openresty.nix b/pkgs/development/interpreters/luajit/openresty.nix index c8bf0cfd50e8..2321f87f524e 100644 --- a/pkgs/development/interpreters/luajit/openresty.nix +++ b/pkgs/development/interpreters/luajit/openresty.nix @@ -15,5 +15,17 @@ callPackage ./default.nix rec { hash = "sha256-SICmM+/dvp/36UAWAH0l7D938iFDimnoKBOjlOodrCY="; }; + extraMeta = { + badPlatforms = [ + "loongarch64-linux" # See https://github.com/LuaJIT/LuaJIT/issues/1278 + "riscv64-linux" # See https://github.com/LuaJIT/LuaJIT/issues/628 + # 64-bit POWER (LE and BE, either ELF ABI version on the latter) *is* supported, but ELFv1 powerpc64-linux has an + # issue with memory allocation + # https://github.com/openresty/luajit2/issues/258 + # Both BE ABI versions use the same double though, so would have to inspect stdenv to differentiate. + "powerpc64-linux" + ]; + }; + inherit self passthruFun; }