-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (53 loc) · 1.7 KB
/
flake.nix
File metadata and controls
61 lines (53 loc) · 1.7 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
{
description = "Food you development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{
self,
nixpkgs,
...
}@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
system = system;
config.android_sdk.accept_license = true;
config.allowUnfree = true;
};
buildToolsVersion = "36.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ buildToolsVersion ];
systemImageTypes = [ "google_apis_playstore" ];
abiVersions = [ "arm64-v8a" ];
includeNDK = false;
includeEmulator = false;
includeExtras = [ ];
};
ktfmtJar = pkgs.fetchurl {
url = "https://github.com/facebook/ktfmt/releases/download/v0.61/ktfmt-0.61-with-dependencies.jar";
sha256 = "b2a6ef02352a4c4ada96610196038129a877d7cddd34fe5290c764bce98cd5f9";
};
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
pkgs.just
pkgs.temurin-bin-21
pkgs.jq
pkgs.zensical
androidComposition.androidsdk
];
KTFMT_JAR = "${ktfmtJar}";
ANDROID_HOME = "${androidComposition.androidsdk}/libexec/android-sdk";
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk/ndk-bundle";
shellHook = ''
export PATH="$ANDROID_HOME/build-tools/${buildToolsVersion}:$PATH"
export PATH="$ANDROID_HOME/platform-tools:$PATH"
just | ${pkgs.lolcat}/bin/lolcat
'';
};
};
}