-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathflake.nix
More file actions
77 lines (77 loc) · 2.1 KB
/
flake.nix
File metadata and controls
77 lines (77 loc) · 2.1 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
description = "Flutter";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
buildToolsVersion = "35.0.1";
platformToolsVersion = "35.0.2";
ndkVersion = "28.2.13676358";
androidEnv = pkgs.androidenv.override { licenseAccepted = true; };
androidComposition = androidEnv.composeAndroidPackages {
platformToolsVersion = platformToolsVersion;
ndkVersion = ndkVersion;
cmakeVersions = [ "3.22.1" ];
includeNDK = true;
buildToolsVersions = [
buildToolsVersion
"35.0.0"
"34.0.0"
"33.0.1"
];
platformVersions = [
"36"
"35"
"34"
"33"
"32"
"31"
];
extraLicenses = [
"android-googletv-license"
"android-sdk-arm-dbt-license"
"android-sdk-license"
"android-sdk-preview-license"
"google-gdk-license"
"intel-android-extra-license"
"intel-android-sysimage-license"
"mips-android-sysimage-license"
];
};
androidSdk = androidComposition.androidsdk;
in
{
devShell =
with pkgs;
mkShell rec {
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
NDK_VERSION = ndkVersion;
JAVA_HOME = jdk17.home;
FLUTTER_ROOT = flutter;
DART_ROOT = "${flutter}/bin/cache/dart-sdk";
buildInputs = [
flutter
androidSdk # The customized SDK that we've made above
jdk17
];
};
}
);
}