-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathflake.nix
More file actions
78 lines (66 loc) · 2.61 KB
/
flake.nix
File metadata and controls
78 lines (66 loc) · 2.61 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
description = "Native Telegram client for Android based on TDLib.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
perSystem =
{ pkgs, system, ... }:
let
androidComposition =
pkgs:
(pkgs.androidenv.composeAndroidPackages {
platformVersions = [
"35"
"36"
];
buildToolsVersions = [
"35.0.0"
];
cmakeVersions = [
"3.22.1"
];
ndkVersions = [
"27.0.12077973"
];
abiVersions = [
"armeabi-v7a"
"arm64-v8a"
"x86_64"
];
systemImageTypes = [ "google_apis_playstore" ];
includeNDK = true;
includeCmake = true;
includeExtras = [ "extras;google;auto" ];
}).androidsdk;
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
devShells.default =
(pkgs.buildFHSEnv {
name = "monogram-sdk-env";
targetPkgs = pkgs: [
(androidComposition pkgs)
pkgs.glibc
pkgs.jdk21
];
profile = ''
export JAVA_HOME="/usr/lib/openjdk"
export ANDROID_HOME="/usr/libexec/android-sdk"
'';
runScript = "bash";
}).env;
};
};
}