mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-05 06:17:34 +00:00
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.
34 lines
1.4 KiB
Nix
34 lines
1.4 KiB
Nix
# nix eval --json --file scripts/nix/check-android-pthread-scope.nix
|
|
let
|
|
select = import ./android-pthread-libraries.nix;
|
|
pkgs = {
|
|
lib.optional = condition: value: if condition then [ value ] else [];
|
|
fetchurl = args: args;
|
|
applyPatches = args: args;
|
|
};
|
|
android = select { inherit pkgs; hostPlatform.isAndroid = true; };
|
|
# The false branch must not even evaluate Android sources on other targets.
|
|
other = select {
|
|
pkgs = pkgs // {
|
|
fetchurl = _: throw "Unexpected Android source fetch";
|
|
applyPatches = _: throw "Unexpected Android source patch";
|
|
};
|
|
hostPlatform.isAndroid = false;
|
|
};
|
|
source = builtins.head android.packageSources;
|
|
in
|
|
assert builtins.length android.packageSources == 1;
|
|
assert source.name == "crypton-0.34-android-source";
|
|
assert source.src.url == "https://hackage.haskell.org/package/crypton-0.34/crypton-0.34.tar.gz";
|
|
assert source.src.hash == "sha256-RESEaSTKVWFfzhBJE6WmhnWhgM/q3DUKsrEk+6G8HtY=";
|
|
assert source.patches == [ ./crypton-android-pthread.patch ];
|
|
assert android.directSqlcipherPatches == [ ./direct-sqlcipher-android-pthread.patch ];
|
|
assert android.cabalProjectLocal == "package crypton\n tests: False\n benchmarks: False\n";
|
|
assert other == { packageSources = []; directSqlcipherPatches = []; cabalProjectLocal = ""; };
|
|
{
|
|
androidUsesBothPreplanningPatches = true;
|
|
cryptonVersionAndSourcePinned = true;
|
|
cryptonRetainsDependencyOnlyGoals = true;
|
|
otherPlatformsUnchangedAndLazy = true;
|
|
}
|