Skip to content

Commit

Permalink
libunistring: use gnu libiconv on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
paparodeo committed Dec 12, 2024
1 parent 52a2613 commit 3b2095d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 9 additions & 4 deletions pkgs/development/libraries/libunistring/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
lib,
stdenv,
libiconv,
libiconvReal,
updateAutotoolsGnuConfigScriptsHook,
darwin,
}:
}@args:

let
# https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00375.html
# macoOS libiconv 14 & 15 do not work with libunistring and a configure test
# added in 1.3 rejects even building with it so use gnu libiconv on darwin
libiconv = if stdenv.hostPlatform.isDarwin then libiconvReal else args.libiconv;
in

# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
Expand All @@ -30,9 +38,6 @@ stdenv.mkDerivation (finalAttrs: {

strictDeps = true;
propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv;
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
];
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];

configureFlags = [ "--with-libiconv-prefix=${libiconv}" ];
Expand Down
1 change: 0 additions & 1 deletion pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check
ld64.out
libffi.out
libtapi.out
libunistring.out
libxml2.out
ncurses.dev
ncurses.man
Expand Down

0 comments on commit 3b2095d

Please sign in to comment.