forked from docspell/android-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
58 lines (52 loc) · 1.29 KB
/
shell.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
let
nixpkgsUnstable = builtins.fetchTarball {
##this is nixpkgs-unstable @ 02.08.2020
url = "https://github.com/NixOS/nixpkgs-channels/archive/840c782d507d60aaa49aa9e3f6d0b0e780912742.tar.gz";
};
pkgsUnstable = import nixpkgsUnstable {
config = {
android_sdk = {
accept_license = true;
};
allowUnfree = true;
};
};
in
{ pkgs ? pkgsUnstable }:
(pkgs.buildFHSUserEnv {
name = "android-sdk-env";
targetPkgs = pkgs: (with pkgs;
[
androidenv.androidPkgs_9_0.androidsdk
glibc
gradle
android-studio
]);
runScript = ''
bash
'';
}).env
# let
# nixpkgsUnstable = builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz";
# };
# pkgsUnstable = import nixpkgsUnstable {
# config = {
# android_sdk = {
# accept_license = true;
# };
# };
# };
# androidSdk = pkgsUnstable.androidenv.androidPkgs_9_0.androidsdk;
# platformTools = pkgsUnstable.androidenv.androidPkgs_9_0.platform-tools;
# in
# with pkgsUnstable;
# mkShell {
# buildInputs = [
# platformTools
# androidSdk
# gradle
# glibc
# ];
# GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/28.0.3/aapt2";
# }