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

Get `p4a apk ...` doing _something_ apart from trivially crashing

parent 6e132828
No related branches found
No related tags found
No related merge requests found
{ androidenv, cmakeVersion }:
let
androidComposition = androidenv.composeAndroidPackages {
toolsVersion = "26.1.1";
# platformToolsVersion = "30.0.5";
buildToolsVersions = [ "30.0.3" ];
includeEmulator = false;
emulatorVersion = "30.3.4";
platformVersions = [ "27" "28" "29" "30" ];
includeSources = false;
includeSystemImages = false;
systemImageTypes = [ "google_apis_playstore" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
cmakeVersions = [ cmakeVersion ];
includeNDK = true;
# Check out pkgs/development/mobile/androidenv/repo.json
ndkVersions = [ "23.0.7123448-rc1" "22.0.7026061" ];
useGoogleAPIs = false;
useGoogleTVAddOns = false;
includeExtras = [
"extras;google;gcm"
];
};
in
androidComposition
......@@ -43,15 +43,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1667933212,
"narHash": "sha256-Iu5yhT4nr+IsGPnk61eTKLmffPRL0dwJpWBlIFnAXvY=",
"lastModified": 1667821506,
"narHash": "sha256-u4HKBBfTOPpFsGnM7sjS0+F67Hmf2or3uHKNVxXZtiM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0ab419f97ad748a3150183d3e0706e949924de7a",
"rev": "ebf65554b18ee053311f43e5faa5a3f36626c52e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
......
{
description = "The PrivateStorage Mobile application";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs?ref=nixos-22.05";
};
flake-utils.url = "github:numtide/flake-utils";
pypi-deps-db = {
flake = false;
url = "github:DavHau/pypi-deps-db";
};
mach-nix-flake = {
flake = true;
url = "github:DavHau/mach-nix";
inputs = {
pypi-deps-db.follows = "pypi-deps-db";
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
pypi-deps-db.follows = "pypi-deps-db";
};
};
nixpkgs = {
url = "github:NixOS/nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
pypi-deps-db = {
flake = false;
url = "github:DavHau/pypi-deps-db";
};
};
outputs = { self, nixpkgs, flake-utils, mach-nix-flake, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let
......@@ -25,7 +25,10 @@
mach-nix = mach-nix-flake.lib.${system};
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
};
lib = pkgs.lib;
......@@ -40,18 +43,32 @@
'';
};
cmakeVersion = "3.10.2";
# Also includes ndk
androidComposition = pkgs.callPackage ./android.nix { inherit cmakeVersion; };
in {
devShells.default = pkgs.mkShell {
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/android.section.md
# is a good reference for this stuff.
devShells.default = pkgs.mkShell rec {
name = "ps-mobile";
version = "2022.10.21";
# The docs talk about ANDROID_SDK_ROOT but apparently it has been
# renamed yet again.
ANDROIDSDK = "${androidComposition.androidsdk}/libexec/android-sdk";
ANDROIDNDK = "${ANDROIDSDK}/ndk-bundle";
shellHook = ''
export PATH="$(echo "$ANDROIDSDK/cmake/${cmakeVersion}".*/bin):$PATH"
'';
buildInputs = with pkgs; [
android-studio
android-tools
androidndkPkgs_23b.binaries
androidndkPkgs_23b.binutils
androidndkPkgs_23b.libraries
kivy-env
openjdk8
];
};
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment