-
Notifications
You must be signed in to change notification settings - Fork 11
/
flake.nix
80 lines (80 loc) · 2.05 KB
/
flake.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
description = "Flutter Development Environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
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;
permittedInsecurePackages = [ "olm-3.2.16" ];
};
};
aapt2buildToolsVersion = "34.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [
"30.0.3"
aapt2buildToolsVersion
];
platformVersions = [
"28"
"29"
"30"
"31"
"32"
"33"
"34"
];
includeNDK = true;
ndkVersions = [ "21.4.7075529" ];
cmakeVersions = [ "3.18.1" ];
abiVersions = [
"armeabi-v7a"
"arm64-v8a"
];
};
androidSdk = androidComposition.androidsdk;
in
{
devShell =
with pkgs;
mkShell rec {
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
ANDROID_JAVA_HOME = jdk17.home;
JAVA_8_HOME = jdk8.home;
JAVA_17_HOME = jdk17.home;
SHELL = "${pkgs.bashInteractive}/bin/bash";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${aapt2buildToolsVersion}/aapt2";
buildInputs = [
flutter
androidSdk
jdk17
ninja
gtk3
olm
mpv
ffmpeg
mimalloc
libepoxy
dart
libass
pkg-config
android-tools
android-studio
bashInteractive
];
};
}
);
}