forked from Blendman974/faceclaw
43 lines
1.4 KiB
Nix
43 lines
1.4 KiB
Nix
{ pkgs, config, lib, ... }:
|
|
{
|
|
languages.javascript = {
|
|
enable = true;
|
|
package = pkgs.nodejs_22;
|
|
};
|
|
languages.java = {
|
|
enable = true;
|
|
jdk.package = pkgs.jdk21;
|
|
lsp.enable = false;
|
|
};
|
|
android = {
|
|
enable = true;
|
|
platforms.version = [ "35" ];
|
|
buildTools.version = [ "34.0.0" "35.0.0" "35.0.1" ];
|
|
ndk.enable = true;
|
|
ndk.version = [ "27.2.12479018" ];
|
|
cmake.version = [ ];
|
|
emulator.enable = false;
|
|
systemImages.enable = false;
|
|
sources.enable = false;
|
|
};
|
|
packages = with pkgs; [ git gh curl jq ripgrep python3 pkg-config gnumake gcc unzip zip ];
|
|
# Gradle's downloaded aapt2 cannot run directly on NixOS.
|
|
# Keep API 35 aapt2 for phone builds even with Wear's older tools installed.
|
|
env.GRADLE_OPTS = lib.mkForce "-Dorg.gradle.project.android.aapt2FromMavenOverride=${config.env.ANDROID_HOME}/build-tools/35.0.0/aapt2";
|
|
# NativeScript's doctor rejects a valid build-only SDK without an emulator.
|
|
# enterTest below checks the actual tools used by our local builds.
|
|
env.NS_SKIP_ENV_CHECK = "1";
|
|
env.ANDROID_CMAKE_HOME = "${pkgs.symlinkJoin {
|
|
name = "faceclaw-cmake";
|
|
paths = [ pkgs.cmake pkgs.ninja ];
|
|
}}";
|
|
scripts.faceclaw-setup.exec = "npm ci";
|
|
scripts.faceclaw-test.exec = "npm test";
|
|
enterShell = ''
|
|
export PATH="$DEVENV_ROOT/node_modules/.bin:$PATH"
|
|
'';
|
|
enterTest = ''
|
|
bash "$DEVENV_ROOT/scripts/check-devenv.sh"
|
|
'';
|
|
}
|