From 90fba39526014b94ec1d97ce156476a1d32f714f Mon Sep 17 00:00:00 2001 From: Marco Rebhan Date: Tue, 25 Jul 2023 16:20:47 +0200 Subject: [PATCH] emacs: disable native compilation when cross-compiling Also unmarks Emacs as broken in this build configuration. --- pkgs/applications/editors/emacs/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index b322e19098cc..d3aabb739ec8 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -65,7 +65,7 @@ , withNativeCompilation ? if nativeComp != null then lib.warn "nativeComp option is deprecated and will be removed; use withNativeCompilation instead" nativeComp - else true + else stdenv.buildPlatform.canExecute stdenv.hostPlatform , noGui ? false , srcRepo ? true , withAcl ? false @@ -405,6 +405,6 @@ mkDerivation (finalAttrs: { }; meta = meta // { - broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform); + broken = withNativeCompilation && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform); }; })