Files
simplex-chat/scripts/nix/android-pthread-libraries.nix
T
Moritz Angermann 8c51745233 Keep patched Android crypton as a dependency-only goal
Disable only its newly promoted local tests and benchmarks before planning. Preserve the original library-only dependency scope, package bounds and flags while retaining the pthread metadata patch.
2026-10-17 08:32:28 +09:00

24 lines
1022 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 ];
});
# A local metadata override must keep the former Hackage dependency scope.
# haskell.nix otherwise enables local tests/benchmarks while making the plan.
cabalProjectLocal = if hostPlatform.isAndroid then ''
package crypton
tests: False
benchmarks: False
'' else "";
directSqlcipherPatches = pkgs.lib.optional hostPlatform.isAndroid
./direct-sqlcipher-android-pthread.patch;
}