-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
113 lines (107 loc) · 2.57 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
description = ''
Android development environment
NOT MY WORK
ALL CREDIT TO https://git.voronind.com/voronind
'';
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @inputs: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import nixpkgs {
system = system;
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
};
jdk = pkgs.jdk11;
buildTools = "31.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
buildToolsVersions = [ buildTools ];
cmdLineToolsVersion = "8.0";
includeEmulator = false;
includeNDK = false;
includeSources = false;
includeSystemImages = false;
platformToolsVersion = "34.0.5";
platformVersions = [ "31" ];
toolsVersion = "26.1.1";
useGoogleAPIs = false;
useGoogleTVAddOns = false;
# cmakeVersions = [ "3.10.2" ];
# emulatorVersion = "30.3.4";
# includeExtras = [ "extras;google;gcm" ];
# ndkVersions = ["22.0.7026061"];
# systemImageTypes = [ "google_apis_playstore" ];
};
androidSdk = androidComposition.androidsdk;
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-basic
amsmath
babel
capt-of
catchfile
collection-fontsextra
cyrillic
dvipng
dvisvgm
environ
etoolbox
fancyhdr
fontspec
geometry
hyperref
luacode
luatexbase
montserrat
parskip
pgf
tcolorbox
tocloft
ulem
wrapfig
xcolor;
#(setq org-latex-compiler "lualatex")
#(setq org-preview-latex-default-process 'dvisvgm)
});
in {
devShells.${system} = {
dev = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
android-tools
androidSdk
glibc
gnumake
jdk
jq # For curl scripts.
];
buildInputs = with pkgs; [];
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/${buildTools}/aapt2";
JAVA_HOME = "${jdk}";
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/";
DEVSHELL = 0;
shellHook = ''
exec ${pkgs.zsh}/bin/zsh
'';
};
doc = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
gnumake
jdk
tex
];
buildInputs = with pkgs; [];
JAVA_HOME = "${jdk}";
DEVSHELL = 0;
shellHook = ''
exec ${pkgs.zsh}/bin/zsh
'';
};
};
};
}