-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.nix
38 lines (37 loc) · 1.09 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
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let
android-nixpkgs = callPackage (import (builtins.fetchGit {
url = "https://github.com/tadfisher/android-nixpkgs.git";
})) {
# Default; can also choose "beta", "preview", or "canary".
channel = "stable";
};
android-sdk = android-nixpkgs.sdk (sdkPkgs: with sdkPkgs; [
cmdline-tools-latest
build-tools-30-0-3
platform-tools
platforms-android-30
platforms-android-31
platforms-android-28
tools
patcher-v4
emulator
]);
in
mkShell {
buildInputs = [
git
flutter
# Android target packages
jdk android-sdk
# Linux builds are not (yet) supported via nix builds
];
shellHook = ''
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools
sdkmanager --sdk_root=$ANDROID_HOME
# appimage-builder
wget -nc -O build/appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/Continuous/appimage-builder-1.1.1.dev32+g2709a3b-x86_64.AppImage
chmod +x build/appimage-builder-x86_64.AppImage
'';
}