Files
simplex-chat/scripts/nix/android-pthread-libraries.nix
T
Moritz Angermann 4051b8f71f Fix Android pthread metadata before mobile shared linking
Patch crypton and direct-sqlcipher before planning: Bionic supplies pthread in libc and the NDK has no separate libpthread. Preserve compiler threading flags and the shared-link adapter.

Check Android-only source selection and allow the existing Android CI group to be dispatched independently for final-link validation.
2026-10-17 08:20:19 +09:00

17 lines
732 B
Nix

# Bionic supplies pthread symbols in libc, with no separate libpthread.
# Remove the two Linux library declarations before planning so Cabal's v2
# source and package registrations agree; keep compiler -pthread flags intact.
{ pkgs, hostPlatform }:
{
packageSources = pkgs.lib.optional hostPlatform.isAndroid (pkgs.applyPatches {
name = "crypton-0.34-android-source";
src = pkgs.fetchurl {
url = "https://hackage.haskell.org/package/crypton-0.34/crypton-0.34.tar.gz";
hash = "sha256-RESEaSTKVWFfzhBJE6WmhnWhgM/q3DUKsrEk+6G8HtY=";
};
patches = [ ./crypton-android-pthread.patch ];
});
directSqlcipherPatches = pkgs.lib.optional hostPlatform.isAndroid
./direct-sqlcipher-android-pthread.patch;
}