mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
chore: add pinned Nix development environment
This commit is contained in:
6 files changed
+137
No files matched your search
@@ -0,0 +1,3 @@
|
||||
watch_file devenv.nix devenv.yaml devenv.lock
|
||||
eval "$(devenv direnvrc)"
|
||||
use devenv
|
||||
@@ -49,6 +49,9 @@ faceclaw_settings.xml
|
||||
faceclaw_settings*.json
|
||||
|
||||
# Developer configs
|
||||
.devenv*
|
||||
.direnv/
|
||||
devenv.local.nix
|
||||
build_paths.sh
|
||||
**/xcuserdata/
|
||||
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"nodes": {
|
||||
"devenv": {
|
||||
"locked": {
|
||||
"dir": "src/modules",
|
||||
"lastModified": 1793731702,
|
||||
"narHash": "sha256-WlVNaWXVTYaGBNey2Z+20sY1lT7BvzJEECb+VlDDdk0=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "9655d320b8f9df74dbecf681f52a7334574606c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "src/modules",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"inputs": {
|
||||
"nixpkgs-src": "nixpkgs-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1793043970,
|
||||
"narHash": "sha256-m14odYTdkBUEkJOiEYs2zjGjn8fcjvdCJsm45+k084U=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"rev": "d97234e58d4e90e3bf77c082fc3b546e51200938",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "rolling",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1792812153,
|
||||
"narHash": "sha256-T2+XBfNbf9pecLUWS4+RtuVNZ3W8K5taG5QdV71mWlk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "674a2028661e550a97400c1cc992b9cca9a668a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devenv": "devenv",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
languages.javascript = {
|
||||
enable = true;
|
||||
package = pkgs.nodejs_22;
|
||||
};
|
||||
languages.java = {
|
||||
enable = true;
|
||||
jdk.package = pkgs.jdk17;
|
||||
};
|
||||
android = {
|
||||
enable = true;
|
||||
platforms.version = [ "35" ];
|
||||
buildTools.version = [ "35.0.0" ];
|
||||
ndk.enable = true;
|
||||
ndk.version = [ "27.2.12479018" ];
|
||||
cmake.version = [ "3.22.1" ];
|
||||
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.
|
||||
env.GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${config.env.ANDROID_HOME}/build-tools/35.0.0/aapt2";
|
||||
scripts.faceclaw-setup.exec = "npm ci";
|
||||
scripts.faceclaw-test.exec = "npm test";
|
||||
enterShell = ''
|
||||
export PATH="$DEVENV_ROOT/node_modules/.bin:$PATH"
|
||||
'';
|
||||
enterTest = ''
|
||||
node --version
|
||||
java -version
|
||||
test -f "$ANDROID_HOME/platforms/android-35/android.jar"
|
||||
test -x "$ANDROID_HOME/build-tools/35.0.0/aapt2"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
inputs:
|
||||
nixpkgs:
|
||||
url: github:cachix/devenv-nixpkgs/rolling
|
||||
nixpkgs:
|
||||
allow_unfree: true
|
||||
android_sdk:
|
||||
accept_license: true
|
||||
@@ -0,0 +1,23 @@
|
||||
# Nix development environment
|
||||
|
||||
Install Nix with flakes and devenv, then run `devenv shell` in this directory
|
||||
(or `nix run nixpkgs#devenv -- shell`). With direnv, `direnv allow` loads `.envrc`.
|
||||
The committed `devenv.lock` pins the environment inputs.
|
||||
|
||||
The environment provides Node 22/npm, Java 17, Android SDK/platform 35,
|
||||
build-tools 35.0.0, NDK 27, CMake, Git/GitHub CLI, Python and build utilities.
|
||||
Android SDK licenses are accepted through `devenv.yaml`. Gradle uses the
|
||||
Nix-patched SDK aapt2. Gradle itself comes from the repository's wrapper.
|
||||
|
||||
Run `faceclaw-setup` (`npm ci`) once, then `faceclaw-test` (`npm test`),
|
||||
`npm run lint` and `npm run test:kotlin`. `devenv test` checks the environment.
|
||||
`./build.sh` builds the Android app; it does not install it. On NixOS, any
|
||||
additional downloaded native executables may require the host's nix-ld support.
|
||||
iOS builds still require macOS/Xcode and are outside this Linux environment.
|
||||
|
||||
Keep machine-specific signing/device settings in the ignored `build_paths.sh`.
|
||||
Use `gh auth login` separately if GitHub CLI is not already authenticated.
|
||||
|
||||
Software tests do not validate Bluetooth behavior on physical glasses. Record
|
||||
device/firmware versions and manual results separately for hardware checks.
|
||||
Do not flash firmware during development without explicit permission.
|
||||
Reference in new issue
Block a user