Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33335059
D3640.1768899823.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D3640.1768899823.diff
View Options
diff --git a/flake.nix b/flake.nix
--- a/flake.nix
+++ b/flake.nix
@@ -20,6 +20,7 @@
localOverlay # this should expose devShell
];
inherit system;
+ config.android_sdk.accept_license = true;
};
# https://github.com/numtide/flake-utils#usage for more examples
in utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ] (system: rec {
diff --git a/nix/android-dev-env.nix b/nix/android-dev-env.nix
new file mode 100644
--- /dev/null
+++ b/nix/android-dev-env.nix
@@ -0,0 +1,22 @@
+{ androidenv }:
+
+androidenv.composeAndroidPackages {
+ toolsVersion = "26.1.1";
+ platformToolsVersion = "31.0.3";
+ buildToolsVersions = [ "31.0.0" ];
+ includeEmulator = false;
+ emulatorVersion = "30.9.0";
+ platformVersions = [ "30" ];
+ includeSources = false;
+ includeSystemImages = false;
+ systemImageTypes = [ "google_apis_playstore" ];
+ abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
+ cmakeVersions = [ "3.10.2" ];
+ includeNDK = true;
+ ndkVersions = ["22.0.7026061"];
+ useGoogleAPIs = false;
+ useGoogleTVAddOns = false;
+ includeExtras = [
+ "extras;google;gcm"
+ ];
+}
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -1,6 +1,7 @@
{ mkShell
, stdenv
, lib
+, androidDevEnv
, arcanist
, darwin
, nodejs-16_x
@@ -17,6 +18,9 @@
nodejs-16_x
protobuf3_15
yarn
+ ] ++ lib.optionals stdenv.isx86_64 [
+ # aarch64-darwin tarballs are not available
+ androidDevEnv.androidsdk
];
# include any libraries or programs in buildInputs
@@ -27,6 +31,11 @@
Security
]);
+ # if a package exposes many commands, libraries, shellhooks, etc. Add here
+ inputsFrom = [
+ openjdk11
+ ];
+
# shell commands to be ran upon entering shell
shellHook = ''
# For NixOS, the pre-compiled binaries from npm will not be able to find
diff --git a/nix/overlay.nix b/nix/overlay.nix
--- a/nix/overlay.nix
+++ b/nix/overlay.nix
@@ -1,5 +1,6 @@
prev: final: {
# add packages meant for just this repository
+ androidDevEnv = prev.callPackage ./android-dev-env.nix { };
devShell = final.callPackage ./dev-shell.nix { };
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 9:03 AM (56 m, 43 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5960150
Default Alt Text
D3640.1768899823.diff (2 KB)
Attached To
Mode
D3640: Add Android to Nix
Attached
Detach File
Event Timeline
Log In to Comment