Skip to content
Snippets Groups Projects
Commit a8607881 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

cross-compile python3.10 for aarch64-android

parent 6f314be8
No related branches found
No related tags found
No related merge requests found
......@@ -111,9 +111,6 @@
'';
};
in {
packages.python = pkgs.pkgsCross.aarch64-android.tahoe-lafs;
packages.apk = pkgs.androidenv.buildApp {
name = "PrivateStorage Mobile";
src = ./app;
......@@ -153,6 +150,8 @@
ANDROID_PLATFORM_VERSION = "${platformVersion}";
# https://nix.dev/tutorials/cross-compilation
buildInputs = with pkgs; [
gradle-wrapper
ant
......@@ -212,5 +211,43 @@
nativeBuildInputs =
with pkgs; getBuildInputs (drv: drv.nativeBuildInputs) [ openssl libffi python39 ];
};
} // {
packages.aarch64-android.host-python310 = (pkgs.pkgsCross.aarch64-android.python310.override {
# Turn off all the things. Each one might be broken for
# cross-compilation and even if not we don't need them for this build
# Python. We just need it to report the right platform info.
mimetypesSupport = false;
x11Support = false;
bluezSupport = false;
sqlite = null;
openssl = null;
tzdata = null;
readline = null;
}).overrideAttrs (old: {
# Turn off even more things which aren't parameters to the Python
# expression.
# These drag in an aarch64-android bash which fails to build.
preFixup = null;
postPatch = null;
# This drags in a -lcrypt dependency which isn't satisfied by Google
# Android Bionic.
LIBS = null;
});
# packages.aarch64-android.zfec = self.packages.aarch64-android.host-python310.buildPythonPackage;
# let
# build-python = pkgs.pkgsCross.${system}.python310;
# host-python = pkgs.pkgsCross.aarch64-android.python310;
# build-pyenv = build-python.withPackages (ps: [ (ps.callPackage ./crossenv.nix) ]);
# in
# pkgs.mkDerivation {
# name = "python3.10-zfec";
# version = "2.3.4"; # XXX
# src = fetchPypi
# };
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment