From 468fd1ddba67abf549c9ac9cc8d5facb970dd9cb Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Sun, 13 Jul 2025 14:11:49 -0400 Subject: [PATCH] ldmud: fix MacOS iconv link time errors The LDMud autotools build needs some help finding the right libiconv on MacOS systems. Without nudging it the right direction with LDFLAGS the system libiconv is used and produces missing symbol errors at link-time. --- pkgs/by-name/ld/ldmud/package.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ld/ldmud/package.nix b/pkgs/by-name/ld/ldmud/package.nix index 90c46c1c35c8..c1ffc7f2f97e 100644 --- a/pkgs/by-name/ld/ldmud/package.nix +++ b/pkgs/by-name/ld/ldmud/package.nix @@ -87,10 +87,14 @@ stdenv.mkDerivation (finalAttrs: { (lib.enableFeature pythonSupport "use-python") ]; - preConfigure = lib.optionalString mysqlSupport '' - export CPPFLAGS="-I${lib.getDev libmysqlclient}/include/mysql" - export LDFLAGS="-L${libmysqlclient}/lib/mysql" - ''; + preConfigure = + lib.optionalString mysqlSupport '' + export CPPFLAGS="-I${lib.getDev libmysqlclient}/include/mysql" + export LDFLAGS="-L${libmysqlclient}/lib/mysql" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + export LDFLAGS="$LDFLAGS -L${libiconv}/lib -liconv" + ''; installTargets = [ "install-driver"