-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevshell.nix
44 lines (43 loc) · 969 Bytes
/
devshell.nix
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ pkgs }:
with pkgs;
let
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
targets = ["aarch64-linux-android" "armv7-linux-androideabi" "x86_64-linux-android" "i686-linux-android"];
};
in
# Configure your development environment.
#
# Documentation: https://github.com/numtide/devshell
devshell.mkShell {
name = "android-project";
motd = ''
Entered the Android app development environment.
'';
env = [
{
name = "ANDROID_HOME";
value = "${android-sdk}/share/android-sdk";
}
{
name = "ANDROID_SDK_ROOT";
value = "${android-sdk}/share/android-sdk";
}
{
name = "JAVA_HOME";
value = jdk17.home;
}
];
packages = [
android-sdk
rustToolchain
cargo-expand
gradle
jdk17
];
devshell.startup.installCargoCliTools.text = ''
export PATH="$PWD/bin:$PATH"
if ! type tsync > /dev/null 2> /dev/null; then
cargo install tsync --root $PWD
fi
'';
}