-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
58 lines (52 loc) · 1.42 KB
/
shell.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
let
pkgs = import ./nix;
risuto-app-env = pkgs.npmlock2nix.v1.node_modules {
src = ./risuto-app;
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
ELECTRON_OVERRIDE_DIST_PATH = "${pkgs.electron}/bin";
};
androidBuildToolsVersion = "30.0.3";
androidPkgs = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ androidBuildToolsVersion ];
platformVersions = [ "30" ];
includeEmulator = true;
emulatorVersion = "31.3.14";
includeSystemImages = true;
abiVersions = [ "x86_64" ];
};
in
pkgs.stdenv.mkDerivation {
name = "risuto";
buildInputs = (
(with pkgs; [
androidPkgs.androidsdk
cacert
cargo-bolero
cargo-nextest
gradle
jdk8_headless
mdbook
niv
nodejs
nodePackages.cordova
nodePackages.npm
nodePackages.sass
openssl
p7zip
pkgconfig
rust-analyzer-nightly
sqlx-cli
trunk
(fenix.combine (with fenix; [
minimal.cargo
minimal.rustc
targets.wasm32-unknown-unknown.latest.rust-std
]))
])
);
NODE_PATH = "${risuto-app-env}/node_modules";
ELECTRON_OVERRIDE_DIST_PATH = "${pkgs.electron}/bin";
USE_SYSTEM_7ZA = "true";
ANDROID_SDK_ROOT = "${androidPkgs.androidsdk}/libexec/android-sdk";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidPkgs.androidsdk}/libexec/android-sdk/build-tools/${androidBuildToolsVersion}/aapt2";
}