Files
simplex-chat/scripts/nix/android-iserv-project.nix
T
Moritz Angermann 748becda3e Enable ARM32 Android Template Haskell on emulated Linux builders
Scope the scheduling opt-out to the patched QEMU versions, patch the interpreter source before planning, and expose the real static Bionic and GNU iconv symbols. Use the RTS package dependency for Android libffi.

The production interpreter reaches Haskell main on Rosetta and native ARM64 QEMU. Normal target TH, the ARM32 shared export, a C caller returning 42, and upstream annotations pass. Profiling execution is not yet validated.
2026-10-16 13:22:52 +09:00

21 lines
760 B
Nix

{ config, lib, pkgs, ... }:
lib.mkIf (
pkgs.stdenv.hostPlatform.isAndroid
&& pkgs.stdenv.hostPlatform.isAarch32
&& config.compiler-nix-name == "ghc914-sh"
&& config.name == "iserv-proxy"
) {
# Patch before Cabal planning: v2 hashes must describe the same source it
# later packages. Bionic's real static libc routines must win at startup.
src = lib.mkForce (pkgs.pkgsBuildBuild.applyPatches {
name = "android-arm32-iserv-proxy-source";
src = pkgs.haskell-nix.sources.iserv-proxy;
patches = [
./android-iserv-static-libc.patch
# The API26 project declares GNU libiconv for ghc-internal. Its real
# definitions need explicit registration in the static interpreter.
./android-iserv-gnu-iconv.patch
];
});
}