forked from maksimowiczm/FoodYou
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (53 loc) · 1.75 KB
/
flake.nix
File metadata and controls
62 lines (53 loc) · 1.75 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
{
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.58/ktfmt-0.58-with-dependencies.jar";
sha256 = "0369a4351367b0de2374b0f1c3962ef7d5d222a4bc58d7197d06948d46e4bea5";
};
pythonEnv = pkgs.python3.withPackages (ps: with ps; [ pandas openpyxl ]);
in
{
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
pkgs.just
pkgs.temurin-bin-21
androidComposition.androidsdk
pythonEnv
];
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
'';
};
};
}