Subject: [bug#77643] [PATCH] gnu: nano: Fix cross-compiling.

From: Andy Tai <[email-masked]>
Date: Tue, 8 Apr 2025 06:39:29 -0700

* gnu/packages/text-editors.scm (nano)[arguments]<#:configure-flags>: When
cross-compiling, add "ac_cv_func_strcasecmp=yes"
"gl_cv_func_strcasecmp_works=yes".

Change-Id: Ie024ebdba51efe01ab41872f85479525851e3e3a
---
 gnu/packages/text-editors.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 08af5e33a32..99216e61786 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1002,6 +1002,11 @@ (define-public nano
       (sha256
        (base32 "13b2iqmbx5vcyd0rnvvc9l8l79q6665r4xx6gvc28mnmpci95ljs"))))
     (build-system gnu-build-system)
+    (arguments
+     `(,@(if (%current-target-system)
+        ; fix for crosscompiling; on GNU system strcasecmp always works
+       `(#:configure-flags (list "ac_cv_func_strcasecmp=yes" "gl_cv_func_strcasecmp_works=yes"))
+       '())))
     (inputs
      (list gettext-minimal ncurses))
     (home-page "https://www.nano-editor.org/")

base-commit: 1dab24555a494beb3db5a335c675f07043e77f1c
-- 
2.43.0