From 76cca7e72cdc966615f3c157c2c230c640d29c27 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Wed, 11 Dec 2024 23:45:42 -0800 Subject: [PATCH] guile: workaround for libunistring / darwin libiconv guile will fail in the configure phase on darwin due to libunistring not building with libiconv as libunistring 1.3 rejects darwin's libiconv implementation. Work around this by using the gnu libiconv. https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00375.html --- pkgs/development/interpreters/guile/2.0.nix | 9 ++++++++- pkgs/development/interpreters/guile/2.2.nix | 9 ++++++++- pkgs/development/interpreters/guile/3.0.nix | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index ad542da643255..73b813c6b003a 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -11,15 +11,22 @@ libffi, libtool, libunistring, + libiconvReal, makeWrapper, pkg-config, pkgsBuildBuild, readline, -}: +}@args: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; + # workaround for libiconv bug in macOS 14/15 + libunistring = + if stdenv.hostPlatform.isDarwin then + args.libunistring.override { libiconv = libiconvReal; } + else + args.libunistring; in builder rec { pname = "guile"; diff --git a/pkgs/development/interpreters/guile/2.2.nix b/pkgs/development/interpreters/guile/2.2.nix index deb74210bdb7c..1e027408ef677 100644 --- a/pkgs/development/interpreters/guile/2.2.nix +++ b/pkgs/development/interpreters/guile/2.2.nix @@ -11,15 +11,22 @@ libffi, libtool, libunistring, + libiconvReal, makeWrapper, pkg-config, pkgsBuildBuild, readline, -}: +}@args: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; + # workaround for libiconv bug in macOS 14/15 + libunistring = + if stdenv.hostPlatform.isDarwin then + args.libunistring.override { libiconv = libiconvReal; } + else + args.libunistring; in builder rec { pname = "guile"; diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix index 473c05ea8383c..a1227d1774c94 100644 --- a/pkgs/development/interpreters/guile/3.0.nix +++ b/pkgs/development/interpreters/guile/3.0.nix @@ -11,17 +11,24 @@ libffi, libtool, libunistring, + libiconvReal, libxcrypt, makeWrapper, pkg-config, pkgsBuildBuild, readline, writeScript, -}: +}@args: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; + # workaround for libiconv bug in macOS 14/15 + libunistring = + if stdenv.hostPlatform.isDarwin then + args.libunistring.override { libiconv = libiconvReal; } + else + args.libunistring; in builder rec { pname = "guile";