-
-
Notifications
You must be signed in to change notification settings - Fork 299
Expand file tree
/
Copy pathshell.nix
More file actions
29 lines (29 loc) · 810 Bytes
/
shell.nix
File metadata and controls
29 lines (29 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let
sources = import ./npins;
pkgs = import sources.nixpkgs {
config.android_sdk.accept_license = true;
};
jdk = pkgs.jdk17_headless;
# note: can use pkgs.androidenv.androidPkgs.androidsdk
# but it pulls in lots of toolchains see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/mobile/androidenv/default.nix#L18
androidSdk' =
(pkgs.androidenv.composeAndroidPackages {
platformVersions = [ "33" ];
includeEmulator = false;
includeSystemImages = false;
includeNDK = false;
}).androidsdk;
in
pkgs.mkShellNoCC {
packages = with pkgs; [
androidSdk'
npins
nixfmt-rfc-style
];
shellHook = ''
export JAVA_HOME=${jdk}
export PATH="${jdk}/bin:$PATH"
export ANDROID_SDK=${androidSdk'}/libexec/android-sdk
exec bash
'';
}