From 8726c1403253871ce58839aaa5c6a701282b0a00 Mon Sep 17 00:00:00 2001 From: Redvers Davies Date: Sun, 22 Feb 2026 20:27:40 +0000 Subject: [PATCH] pony-corral: Tells hydra to use base arch instead of native The current ponyc defaults to generative code using "native" unless you specify --cpu on the command line. This causes this hydra-built package to SIGILL on systems with lowlier CPUs (many cloud VMs). This PR ensures that corral is built in a way that the typical stdenv use of using NIX_ENFORCE_NO_NATIVE=1. This will hopefully fully resolve Issue #414174. --- pkgs/by-name/po/pony-corral/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/po/pony-corral/package.nix b/pkgs/by-name/po/pony-corral/package.nix index 1ee6b5310d74..d0ce1734d188 100644 --- a/pkgs/by-name/po/pony-corral/package.nix +++ b/pkgs/by-name/po/pony-corral/package.nix @@ -17,6 +17,17 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-pJ6/+PYxMpJcj1e9v2Al8vIWFizJnLMIw7LlVU9ogS0="; }; + env.arch = + if stdenv.hostPlatform.isx86_64 then + "x86-64" + else if stdenv.hostPlatform.isAarch64 then + "armv8-a" + else + lib.warn '' + architecture '${stdenv.hostPlatform.system}' compiles with native optimizations, + this may result in crashes on incompatible CPUs! + '' "native"; + strictDeps = true; nativeBuildInputs = [ ponyc ];