Propagate Android iconv to interpreter consumers

Declare GNU libiconv as a ghc-internal system dependency in Android projects. The setup hook satisfies configure before it records library names, so consumer slices must also receive the system dependency and its static link flag.

Checked exact production vanilla and profiled interpreter derivations: both now include GNU libiconv in runtimeLibs, and native/cross compiler identities remain unchanged. The core derivation changes through dependency and install metadata; its code generation inputs remain the same.
This commit is contained in:
Moritz Angermann committed 2026-10-16 00:08:51 +09:00
1 parent a07095f8bc
commit 52cbb2c7f7
1 file changed
+9
+9
View File
@@ -9,4 +9,13 @@ lib.mkIf (pkgs.stdenv.hostPlatform.isAndroid && config.compiler-nix-name == "ghc
extra-lib-dirs: ${lib.getLib pkgs.libiconv}/lib
configure-options: --with-iconv-includes=${lib.getDev pkgs.libiconv}/include --with-iconv-libraries=${lib.getLib pkgs.libiconv}/lib
'';
# The libiconv setup hook supplies -liconv during configure. Declare the
# system dependency too, so v2 consumer slices retain that link flag.
modules = [
({ lib, pkgs, ... }:
lib.mkIf pkgs.stdenv.hostPlatform.isAndroid {
packages.ghc-internal.components.library.libs = lib.mkAfter [ pkgs.libiconv ];
})
];
}