-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
44 lines (42 loc) · 1.29 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
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devshell.url = "github:numtide/devshell";
android.url = "github:tadfisher/android-nixpkgs";
};
outputs = inputs@{ flake-parts, android, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devshell.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, pkgs, system, ... }: {
packages.default = pkgs.hello;
devshells.default = let
android-sdk = android.sdk.${system} (pkgs: with pkgs; [
cmdline-tools-latest
build-tools-30-0-3
build-tools-33-0-2
build-tools-34-0-0
platform-tools
platforms-android-30
platforms-android-33
platforms-android-34
emulator
]);
in {
env = [{
name = "ANDROID_HOME";
value = "${android-sdk}/share/android-sdk";
} {
name = "CAPACITOR_ANDROID_STUDIO_PATH";
eval = "$(which android-studio)";
}];
packages = with pkgs; [
android-sdk gradle yarn jq iproute2
];
};
};
};
}