diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..2f05af981 --- /dev/null +++ b/.envrc @@ -0,0 +1,9 @@ +#!/bin/bash + +# Automatically sets up your devbox environment whenever you cd into this +# directory via our direnv integration: + +eval "$(devbox generate direnv --print-envrc)" + +# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ +# for more details diff --git a/.flox/.gitattributes b/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/.flox/.gitignore b/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/.flox/env.json b/.flox/env.json new file mode 100644 index 000000000..919a3f917 --- /dev/null +++ b/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "analytics-react-native", + "version": 1 +} diff --git a/.flox/env/manifest.lock b/.flox/env/manifest.lock new file mode 100644 index 000000000..6aae3480e --- /dev/null +++ b/.flox/env/manifest.lock @@ -0,0 +1,1667 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/latest" + }, + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64", + "IOS_SIM_DEVICE": "iPhone 17", + "IOS_SIM_LATEST_DEVICE": "iPhone 17", + "IOS_SIM_RUNTIME": "26.1" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n export ROOT_PROJECT=\"$project_root\"\nif [ -f \"$project_root/env/android/android-common/setup.sh\" ]; then\n source \"$project_root/env/android/android-common/setup.sh\"\nfi\nif [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\nfi\n\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"medium_phone_API33_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"medium_phone_API33_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_LATEST:-$default_avd}}\" EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + }, + "android-emulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"pixel_API21_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"pixel_API21_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_MIN:-$default_avd}}\" AVD_FLAVOR=\"minsdk\" AVD_SKIP_SECONDARY=1 EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + }, + "ios-simulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=latest IOS_DOWNLOAD_RUNTIME=1 bash \"$project_root/scripts/ios.sh\" start\n'\n" + }, + "ios-simulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=minsdk bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + }, + "build": { + "analytics-react-native": { + "command": " set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n cd \"$project_root\"\n yarn install --immutable\n yarn build\n yarn lint\n yarn test --coverage\n out_dir=\"${out:-${OUT:-}}\"\n if [ -n \"${out_dir:-}\" ]; then\n mkdir -p \"$out_dir/artifacts\"\n for pkg in packages/core packages/sovran packages/shared packages/plugins/*; do\n if [ -d \"$pkg/lib\" ]; then\n dest=\"$out_dir/artifacts/$(basename \"$pkg\")\"\n mkdir -p \"$dest\"\n cp -R \"$pkg/lib\" \"$dest/\"\n fi\n done\n if [ -d coverage ]; then\n cp -R coverage \"$out_dir/coverage\"\n fi\n fi\n", + "description": "Yarn install, build, lint, and test the monorepo" + } + } + }, + "packages": [ + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/256rcn7cqsimacisbfw0am6p9k3c1bg4-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:53.946649Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/av5g6hfp0yiir3iavg72js70ian8hxyf-cocoapods-1.16.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/ksmn2n54sby6rxxs3j515hz68j7s7x8x-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:05.777201Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/har71589bwmh6h6skisd20b3c6lrwmz7-cocoapods-1.16.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/byb838v8rcxdql3w6cx153f9353x79hi-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:54.942580Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/v2xbkgrvn0b4g4qq7j5x60va0d4gf0kw-gradle-8.14.3" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/vvq6pjywqyxdk8zdbb217chzahg3iyck-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:21.362203Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/mvs8d5c60yyx3sxpppg1r67yjvlrrhhh-gradle-8.14.3" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/imj8fv0d6x3knhjh4sdw4hp5ax8ramhs-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:06.784996Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/jy3fpkvcymjaglzi9z2gbpzcyqypgfxh-gradle-8.14.3" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/hszbdb4bbpl6qw5li8wyrhf96vvfk2m4-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:21.844293Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/80fgl9ffaxlxl9s4i1jb37krcljx669g-gradle-8.14.3" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/87rnl1qkmwrkkzmk0xhnzwak8h9mxdsr-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:09.553266Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/s9nq23qm9animys49h7g7w660jz4ccwz-zulu-ca-jdk-17.0.12" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/sxpzi41bvnl26cy79j9zk3vvlslpbxnx-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:38.984999Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/x61h0zs6dawi6i6946c30p9qmn8r45q8-openjdk-17.0.17+10-debug", + "out": "/nix/store/qkzq9lxji4zs1dgdlxwwwknaggij5lag-openjdk-17.0.17+10" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/rq1jxlr68pjj9ws31zazwgam60s3smn0-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:21.121887Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/n1rp0ay6dp66yvr2dzwn840hcnpk8010-zulu-ca-jdk-17.0.12" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/p4fc4qy06b89x4yg2kfch2fypfl73iz1-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:40.942126Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/7hk6cjcmfgml2nq293g7cdsx8nrab3ir-openjdk-17.0.17+10-debug", + "out": "/nix/store/4xlra07s99b60kj0md6drgh0qmrkdpby-openjdk-17.0.17+10" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/ws40yy01bbw9sjd7y93byf8a15hv0m65-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:17.356063Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/fsrayxzszxaqcm5k849c33qncvr22rf1-nodejs-20.20.0-dev", + "libv8": "/nix/store/8dmg3m6pxx6g850dr572fbnkkb7l4qx9-nodejs-20.20.0-libv8", + "out": "/nix/store/l5zcv2mlpz4vkfr8gaznjl4l09pw7qva-nodejs-20.20.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/6wvfvavgqcd53gw4njxm1zc1cp3jg9ar-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:54.630769Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/6qd7afr0a8mw1y4lnddv380nb1yxg7mn-nodejs-20.20.0-dev", + "libv8": "/nix/store/9afma3lnsdzfscr8783lwcqydad477m5-nodejs-20.20.0-libv8", + "out": "/nix/store/8bcjyh3wm6172gch2hmjaw70786vnn0p-nodejs-20.20.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/m33808ahw4wxd0vz9brws07q39z0b76n-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:28.651760Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/q91w4zkkd52829lcx3c1m9k1b2clgv3r-nodejs-20.20.0-dev", + "libv8": "/nix/store/bl853ghmyam6zc9kpr8hq7dk8mdsnddi-nodejs-20.20.0-libv8", + "out": "/nix/store/nfpj0w7ckamxpbzci2y9zsrlsw1yjgsa-nodejs-20.20.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/38nz5j3pxcj6lcgqypvi4pakf6gnqw2g-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:59.682402Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/mha8cz3kq9pnnns2f4ygsdl911nnc9nn-nodejs-20.20.0-dev", + "libv8": "/nix/store/y8syar3i7lnw6ys8akhq252zznlfv0p7-nodejs-20.20.0-libv8", + "out": "/nix/store/jfar9wnj6kvr0gr6klh1gk7vgckkfr5j-nodejs-20.20.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/sy0jbfhah2dkmxf9ngd4j5wpymj61s8z-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:38.337965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2l7sbyyqardvrzr35zkrw67gbng5gb8y-yarn-berry-4.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/jzxis6qs5mb2lc9lx7xndv5vqmkx10x0-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:45.606272Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/klx9ndw1djgx0zhhyrkcn9an094rmmwv-yarn-berry-4.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/pjdps1mpblxfbmppb8b5wds8mzzjar2m-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:38.743524Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/m6cwiya6hrbwnlprh2cbnmz6c7mkylrf-yarn-berry-4.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/v5xk5ivmrak80ppdcz4jpindj21xy6va-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:24:08.258012Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/q1gys3zgijcciiafbh9nfawkx5wj8179-yarn-berry-4.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:/Users/abueide/code/analytics-react-native/env/android/latest?lastModified=1769137978&narHash=sha256-iVDbftJglRBGIwVNCW73SuNMMKrcjFE4eJ%2BCH7Sv2lg%3D", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.aarch64-darwin.default", + "derivation": "/nix/store/0l95fy1ffhir9i3bc58gsi8mnpcz5py2-androidsdk.drv", + "outputs": { + "out": "/nix/store/jiyz1w3ilgr67zmmliy49acq920wg9s0-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-darwin", + "system": "aarch64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:/Users/abueide/code/analytics-react-native/env/android/latest?lastModified=1769137978&narHash=sha256-iVDbftJglRBGIwVNCW73SuNMMKrcjFE4eJ%2BCH7Sv2lg%3D", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.aarch64-linux.default", + "derivation": "/nix/store/6w6v5wwvmpjbxciw00jqywnnnmsxfvh2-androidsdk.drv", + "outputs": { + "out": "/nix/store/c1r7y7yv0x9wi1rhhkkh1a390mnfl1ry-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-linux", + "system": "aarch64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:/Users/abueide/code/analytics-react-native/env/android/latest?lastModified=1769137978&narHash=sha256-iVDbftJglRBGIwVNCW73SuNMMKrcjFE4eJ%2BCH7Sv2lg%3D", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.x86_64-darwin.default", + "derivation": "/nix/store/d3gwnrkzsk0179m6w13pm0n0k7j7a3ri-androidsdk.drv", + "outputs": { + "out": "/nix/store/4sp4dl3b96qbqkksf964524yxn6s7rvw-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-darwin", + "system": "x86_64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:/Users/abueide/code/analytics-react-native/env/android/latest?lastModified=1769137978&narHash=sha256-iVDbftJglRBGIwVNCW73SuNMMKrcjFE4eJ%2BCH7Sv2lg%3D", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.x86_64-linux.default", + "derivation": "/nix/store/pm23dkchhl3fyzp08bymifcrci3y6ji4-androidsdk.drv", + "outputs": { + "out": "/nix/store/fc9z39c2c6hbmn1yfh6h4h1dzv9g37zp-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-linux", + "system": "x86_64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "hook": { + "on-activate": " set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n export ROOT_PROJECT=\"$project_root\"\nif [ -f \"$project_root/env/android/android-common/setup.sh\" ]; then\n source \"$project_root/env/android/android-common/setup.sh\"\nfi\nif [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\nfi\n\n " + }, + "profile": {}, + "options": {}, + "build": { + "analytics-react-native": { + "command": " set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n cd \"$project_root\"\n yarn install --immutable\n yarn build\n yarn lint\n yarn test --coverage\n out_dir=\"${out:-${OUT:-}}\"\n if [ -n \"${out_dir:-}\" ]; then\n mkdir -p \"$out_dir/artifacts\"\n for pkg in packages/core packages/sovran packages/shared packages/plugins/*; do\n if [ -d \"$pkg/lib\" ]; then\n dest=\"$out_dir/artifacts/$(basename \"$pkg\")\"\n mkdir -p \"$dest\"\n cp -R \"$pkg/lib\" \"$dest/\"\n fi\n done\n if [ -d coverage ]; then\n cp -R coverage \"$out_dir/coverage\"\n fi\n fi\n", + "description": "Yarn install, build, lint, and test the monorepo" + } + }, + "include": { + "environments": [ + { + "dir": "env/common", + "name": "common" + }, + { + "dir": "env/nodejs", + "name": "nodejs" + }, + { + "dir": "env/android/min", + "name": "android-min" + }, + { + "dir": "env/android/latest", + "name": "android-latest" + }, + { + "dir": "env/ios/min", + "name": "ios-min" + }, + { + "dir": "env/ios/latest", + "name": "ios-latest" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "common", + "descriptor": { + "dir": "env/common", + "name": "common" + } + }, + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n " + }, + "profile": {}, + "options": {} + }, + "name": "nodejs", + "descriptor": { + "dir": "env/nodejs", + "name": "nodejs" + } + }, + { + "manifest": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/min" + }, + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"pixel_API21_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"pixel_API21_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_MIN:-$default_avd}}\" AVD_FLAVOR=\"minsdk\" AVD_SKIP_SECONDARY=1 EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + } + }, + "name": "android-min", + "descriptor": { + "dir": "env/android/min", + "name": "android-min" + } + }, + { + "manifest": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/latest" + }, + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"medium_phone_API33_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"medium_phone_API33_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_LATEST:-$default_avd}}\" EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + } + }, + "name": "android-latest", + "descriptor": { + "dir": "env/android/latest", + "name": "android-latest" + } + }, + { + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "vars": { + "IOS_SIM_DEVICE": "iPhone 14", + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n " + }, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=minsdk bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + } + }, + "name": "ios-min", + "descriptor": { + "dir": "env/ios/min", + "name": "ios-min" + } + }, + { + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "vars": { + "IOS_SIM_DEVICE": "iPhone 17", + "IOS_SIM_LATEST_DEVICE": "iPhone 17", + "IOS_SIM_RUNTIME": "26.1" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n " + }, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=latest IOS_DOWNLOAD_RUNTIME=1 bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + } + }, + "name": "ios-latest", + "descriptor": { + "dir": "env/ios/latest", + "name": "ios-latest" + } + } + ], + "warnings": [ + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "android-min" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "android-min" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "android-min" + }, + { + "warning": { + "Overriding": [ + "install", + "android-sdk" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "gradle" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "jdk17" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_AVD_LATEST_ARM" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_AVD_LATEST_X86" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_AVD_MIN" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_EMULATOR_FLAGS" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_EMULATOR_HEADLESS_FLAGS" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_SYSTEM_IMAGE_LATEST_X86" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "ANDROID_SYSTEM_IMAGE_MIN" + ] + }, + "higher_priority_name": "android-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "ios-min" + }, + { + "warning": { + "Overriding": [ + "install", + "node" + ] + }, + "higher_priority_name": "ios-min" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "ios-min" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "ios-min" + }, + { + "warning": { + "Overriding": [ + "install", + "yarn" + ] + }, + "higher_priority_name": "ios-min" + }, + { + "warning": { + "Overriding": [ + "install", + "cocoapods" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "node" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "install", + "yarn" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "IOS_SIM_DEVICE" + ] + }, + "higher_priority_name": "ios-latest" + }, + { + "warning": { + "Overriding": [ + "vars", + "IOS_SIM_LATEST_DEVICE" + ] + }, + "higher_priority_name": "ios-latest" + } + ] + } +} diff --git a/.flox/env/manifest.toml b/.flox/env/manifest.toml new file mode 100644 index 000000000..1208314b0 --- /dev/null +++ b/.flox/env/manifest.toml @@ -0,0 +1,62 @@ +version = 1 + +[install] + +[vars] +[hook] + on-activate = ''' + set -euo pipefail + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + if [ ! -d "$project_root/env" ]; then + project_root="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../../../../.." && pwd)" + fi + export PROJECT_ROOT="$project_root" + export ROOT_PROJECT="$project_root" +if [ -f "$project_root/env/android/android-common/setup.sh" ]; then + source "$project_root/env/android/android-common/setup.sh" +fi +if [ -f "$project_root/scripts/ios.sh" ]; then + source "$project_root/scripts/ios.sh" +fi + + ''' +[profile] + +[include] + environments = [ + { dir = "env/common", name = "common" }, + { dir = "env/nodejs", name = "nodejs" }, + { dir = "env/android/min", name = "android-min" }, + { dir = "env/android/latest", name = "android-latest" }, + { dir = "env/ios/min", name = "ios-min" }, + { dir = "env/ios/latest", name = "ios-latest" } + ] + + +[build] +[build.analytics-react-native] +description = "Yarn install, build, lint, and test the monorepo" +command = """ + set -euo pipefail + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + cd "$project_root" + yarn install --immutable + yarn build + yarn lint + yarn test --coverage + out_dir="${out:-${OUT:-}}" + if [ -n "${out_dir:-}" ]; then + mkdir -p "$out_dir/artifacts" + for pkg in packages/core packages/sovran packages/shared packages/plugins/*; do + if [ -d "$pkg/lib" ]; then + dest="$out_dir/artifacts/$(basename "$pkg")" + mkdir -p "$dest" + cp -R "$pkg/lib" "$dest/" + fi + done + if [ -d coverage ]; then + cp -R coverage "$out_dir/coverage" + fi + fi +""" +[options] diff --git a/.github/workflows/ci-e2e-nightly.yml b/.github/workflows/ci-e2e-nightly.yml new file mode 100644 index 000000000..320134559 --- /dev/null +++ b/.github/workflows/ci-e2e-nightly.yml @@ -0,0 +1,101 @@ +name: E2E (Nightly) + +on: + schedule: + - cron: '0 6 * * *' + workflow_dispatch: + push: + branches: [ci2] + +concurrency: + group: e2e-nightly-${{ github.ref }} + cancel-in-progress: false + +jobs: + run-e2e-ios: + runs-on: macos-15 + env: + YARN_ENABLE_HARDENED_MODE: 0 + strategy: + matrix: + include: + - name: ios-min + ios-device: "iPhone 14" + ios-runtime: "18.5" + simulator-service: ios-simulator-min + xcode-version: "16.1" + device-target: "ios-min" + - name: ios-latest + ios-device: "iPhone 17" + ios-runtime: "26.1" + simulator-service: ios-simulator-latest + xcode-version: "26.1.1" + device-target: "ios-latest" + steps: + - uses: actions/checkout@v4 + - name: Yarn cache (E2E) + uses: actions/cache@v4 + with: + path: | + ~/.cache/yarn + examples/E2E/.yarn/cache + key: e2e-yarn-${{ runner.os }}-${{ hashFiles('examples/E2E/yarn.lock') }} + restore-keys: | + e2e-yarn-${{ runner.os }}- + - name: CocoaPods cache (E2E) + uses: actions/cache@v4 + with: + path: | + ~/Library/Caches/CocoaPods + examples/E2E/ios/Pods + key: e2e-pods-${{ runner.os }}-${{ hashFiles('examples/E2E/ios/Podfile.lock') }} + restore-keys: | + e2e-pods-${{ runner.os }}- + - name: Aggressive disk cleanup (macOS) + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /Applications/Android\ Studio.app + sudo rm -rf /usr/local/share/miniconda + sudo rm -rf "$HOME/Library/Android" + sudo rm -rf "$HOME/.gradle" + sudo rm -rf "$HOME/Library/Developer/CoreSimulator/Devices" + sudo rm -rf "$HOME/Library/Developer/Xcode/DerivedData" + df -H + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ matrix.xcode-version }} + - name: Install flox + uses: flox/install-flox-action@v2.2.0 + - name: iOS E2E Tests + run: | + flox activate -d env/ios/latest -- bash -lc "yarn e2e:ios" + + run-e2e-android: + continue-on-error: true + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - name: android-min + avd-name: pixel_API21_x86_64 + system-image: "system-images;android-21;google_apis;x86_64" + emulator-service: android-emulator-min + device-target: "android-min" + - name: android-latest + avd-name: medium_phone_API33_x86_64 + system-image: "system-images;android-33;google_apis;x86_64" + emulator-service: android-emulator-latest + device-target: "android-latest" + steps: + - uses: actions/checkout@v4 + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + - name: Install flox + uses: flox/install-flox-action@v2.2.0 + - name: Start Android emulator + run: flox services start ${{ matrix.emulator-service }} + - name: Android E2E Tests + run: | + flox activate -d env/android/latest -- bash -lc "set -euo pipefail; yarn e2e:android" diff --git a/.github/workflows/ci-e2e-optional.yml b/.github/workflows/ci-e2e-optional.yml new file mode 100644 index 000000000..f429d8168 --- /dev/null +++ b/.github/workflows/ci-e2e-optional.yml @@ -0,0 +1,100 @@ +name: E2E (On-Demand) + +on: + workflow_dispatch: + inputs: + platforms: + description: "Platforms to run (android, ios, all)" + required: false + default: "all" + pull_request: + branches: [master, beta] + types: [opened, synchronize, reopened, labeled] + paths-ignore: + - 'docs/**' + - 'wiki/**' + - '**/*.md' + +concurrency: + group: e2e-optional-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-e2e-ios: + if: (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e') || github.event_name == 'push') && (github.event.inputs.platforms == 'all' || github.event.inputs.platforms == '' || github.event.inputs.platforms == 'ios' || github.event.inputs.platforms == null) + runs-on: macos-15 + env: + YARN_ENABLE_HARDENED_MODE: 0 + strategy: + matrix: + include: + - name: ios-latest + ios-device: "iPhone 17" + ios-runtime: "26.1" + simulator-service: ios-simulator-latest + xcode-version: "26.1.1" + device-target: "ios-latest" + steps: + - uses: actions/checkout@v4 + - name: Yarn cache (E2E) + uses: actions/cache@v4 + with: + path: | + ~/.cache/yarn + examples/E2E/.yarn/cache + key: e2e-yarn-${{ runner.os }}-${{ hashFiles('examples/E2E/yarn.lock') }} + restore-keys: | + e2e-yarn-${{ runner.os }}- + - name: CocoaPods cache (E2E) + uses: actions/cache@v4 + with: + path: | + ~/Library/Caches/CocoaPods + examples/E2E/ios/Pods + key: e2e-pods-${{ runner.os }}-${{ hashFiles('examples/E2E/ios/Podfile.lock') }} + restore-keys: | + e2e-pods-${{ runner.os }}- + - name: Aggressive disk cleanup (macOS) + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /Applications/Android\ Studio.app + sudo rm -rf /usr/local/share/miniconda + sudo rm -rf "$HOME/Library/Android" + sudo rm -rf "$HOME/.gradle" + sudo rm -rf "$HOME/Library/Developer/CoreSimulator/Devices" + sudo rm -rf "$HOME/Library/Developer/Xcode/DerivedData" + df -H + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ matrix.xcode-version }} + - name: Install flox + uses: flox/install-flox-action@v2.2.0 + - name: iOS E2E Tests + run: | + flox activate -d env/ios/latest -- bash -lc "yarn e2e:ios" + + run-e2e-android: + if: (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e') || github.event_name == 'push') && (github.event.inputs.platforms == 'all' || github.event.inputs.platforms == '' || github.event.inputs.platforms == 'android' || github.event.inputs.platforms == null) + continue-on-error: true + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - name: android-latest + avd-name: medium_phone_API33_x86_64 + system-image: "system-images;android-33;google_apis;x86_64" + emulator-service: android-emulator-latest + device-target: "android-latest" + steps: + - uses: actions/checkout@v4 + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + - name: Install flox + uses: flox/install-flox-action@v2.2.0 + - name: Start Android emulator + run: flox services start ${{ matrix.emulator-service }} + - name: Android E2E Tests + run: | + flox activate -d env/android/latest -- bash -lc "set -euo pipefail; yarn e2e:android" diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml new file mode 100644 index 000000000..06c3792fc --- /dev/null +++ b/.github/workflows/ci-fast.yml @@ -0,0 +1,39 @@ +name: CI Fast + +on: + push: + branches: [master, beta] + paths-ignore: + - 'docs/**' + - 'wiki/**' + - '**/*.md' + pull_request: + branches: [master, beta] + paths-ignore: + - 'docs/**' + - 'wiki/**' + - '**/*.md' + +concurrency: + group: ci-fast-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Yarn cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/yarn + .yarn/cache + key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn-${{ runner.os }}- + - name: Install flox + uses: flox/install-flox-action@v2.2.0 + - name: Build, lint, and test + run: | + flox activate -d env/nodejs -- bash -lc "yarn install --immutable && yarn format:check && yarn test:fast" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index a83508c95..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,158 +0,0 @@ -name: CI -on: - push: - branches: [master, beta] - pull_request: - branches: [master, beta] - workflow_dispatch: -jobs: - cancel_previous: - runs-on: ubuntu-latest - steps: - - uses: styfle/cancel-workflow-action@0.12.1 - with: - workflow_id: ${{ github.event.workflow.id }} - build-and-test: - needs: cancel_previous - runs-on: 'ubuntu-latest' - env: - YARN_ENABLE_HARDENED_MODE: 0 - steps: - - uses: actions/checkout@v4 - # Workaround for corepack enable in node - # Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029) - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: yarn - # End workaround - - - name: Install - run: yarn install --immutable - - name: Build - run: yarn build - - name: Lint - run: yarn lint - - name: Test - run: yarn test --coverage - - run-e2e-ios: - runs-on: 'macos-13' - env: - YARN_ENABLE_HARDENED_MODE: 0 - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Install applesimutils - run: | - HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null - HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null - - - uses: actions/checkout@v4 - # Workaround for corepack enable in node - # Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029) - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: yarn - # End workaround - - - name: Bootstrap - run: yarn install && yarn e2e install && yarn e2e pods - - - name: Bundle Build - run: yarn build - - - name: Detox - Build - run: RCT_NO_LAUNCH_PACKAGER=1 yarn e2e build:ios - - - name: Detox - Test - run: yarn e2e test:ios - - run-e2e-android: - runs-on: 'macos-13' # This is important, linux cannot run the emulator graphically for e2e tests - strategy: - matrix: - api-level: [21] - profile: ['pixel_xl'] - env: - YARN_ENABLE_HARDENED_MODE: 0 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - cache: 'gradle' - - - name: Gradle cache - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - - - name: AVD cache - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd-${{ matrix.api-level }}-${{matrix.profile}} - - - name: create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - profile: ${{matrix.profile}} - avd-name: Pixel_API_21_AOSP - target: default - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - script: echo "Generated AVD snapshot for caching." - - # Workaround for corepack enable in node - # Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029) - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: corepack enable - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: yarn - # End workaround - - - name: Bootstrap - run: yarn install && yarn e2e install # No need to run bootstrap here since we don't need cocoapods - - - name: Bundle build - run: yarn build - - - name: Detox - Build - run: RCT_NO_LAUNCH_PACKAGER=1 yarn e2e build:android - - - name: Detox - Test - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - profile: ${{matrix.profile}} - avd-name: Pixel_API_21_AOSP - target: default - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: true - script: yarn e2e test:android diff --git a/.github/workflows/create_jira.yml b/.github/workflows/create_jira.yml deleted file mode 100644 index 16e5a4596..000000000 --- a/.github/workflows/create_jira.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Create Jira Ticket - -on: - issues: - types: - - opened - -jobs: - create_jira: - name: Create Jira Ticket - runs-on: ubuntu-latest - environment: IssueTracker - steps: - - name: Checkout - uses: actions/checkout@master - - name: Login - uses: atlassian/gajira-login@master - env: - JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} - JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} - JIRA_API_TOKEN: ${{ secrets.JIRA_TOKEN }} - - - name: Create - id: create - uses: atlassian/gajira-create@master - with: - project: LIBRARIES - issuetype: Bug - summary: | - [${{ github.event.repository.name }}] (${{ github.event.issue.number }}): ${{ github.event.issue.title }} - description: | - Github Link: ${{ github.event.issue.html_url }} - ${{ github.event.issue.body }} - # Parent and Epic Link fields (set to same) - fields: '{ - "parent": {"key": "LIBRARIES-2048"}, - "customfield_10002": "LIBRARIES-2048" - }' - - - name: Log created issue - run: echo "Issue ${{ steps.create.outputs.issue }} was created" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f19960e67..5e9e979a5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,38 +20,24 @@ jobs: steps: - uses: actions/checkout@v4 with: - persist-credentials: false + fetch-depth: 0 token: ${{ secrets.GH_TOKEN }} - # Workaround for corepack enable in node - # Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029) - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: corepack enable - uses: actions/setup-node@v4 with: node-version: 20 cache: yarn - # End workaround - - name: Config and Build - run: | - npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - yarn install --immutable - yarn build - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Install flox + uses: flox/install-flox-action@v2.2.0 - - name: Publish (All) - if: github.event.inputs.workspace == '' - run: yarn release + - name: Config, Build, Release + run: flox activate -d . -- bash -lc "bash flox/scripts/release.sh" env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }} YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Update Apps run: | - yarn install --no-immutable - yarn e2e install --no-immutable - yarn example install --no-immutable + flox activate -d env/nodejs -- bash -lc "yarn install --no-immutable && yarn e2e install --no-immutable && yarn example install --no-immutable" diff --git a/.gitignore b/.gitignore index deb042005..f144e2ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ !.yarn/cache #.pnp.* +.cache/ + # OSX # .DS_Store @@ -91,4 +93,4 @@ tsconfig.tsbuildinfo # Library Info Auto Generated file packages/core/src/info.ts -.pnpm/ \ No newline at end of file +.pnpm/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..5bc3edb5b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,29 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- Yarn workspaces live under `packages`: `core` (SDK runtime), `sovran` (state store), `shared` (cross-package utilities), and `plugins/*` (destination and helper plugins). Native iOS/Android sources reside in each package’s `ios` and `android` folders. +- Example apps sit in `examples/AnalyticsReactNativeExample` (manual QA) and `examples/E2E` (Detox). Scripts live in `flox/scripts`; configuration lives alongside packages (e.g., `tsconfig.json`, `babel.config.js`, `jest.config.js`). + +## Build, Test, and Development Commands +- `yarn bootstrap`: install root + workspace deps and pod install for example/e2e apps. +- `yarn build`: run workspace builds in topo order. +- `yarn testAll` / `yarn test`: workspace Jest suite or root Jest run. +- `yarn lint`; `yarn lint --fix`: ESLint across the monorepo. +- `yarn typescript`: type-check without emitting. +- Example app: `yarn example start | ios | android`. Detox: `yarn e2e start:e2e` then platform builds/tests (e.g., `yarn e2e e2e:build:ios` + `yarn e2e e2e:test:ios`). + +## Coding Style & Naming Conventions +- TypeScript-first; native code should mirror existing Swift/Obj-C/Kotlin style. Two-space indentation and Prettier formatting via ESLint rules. +- Prefer camelCase for variables/functions, PascalCase for React components/classes, and UPPER_SNAKE for constants. Plugin packages follow `plugin-*` folder naming and publish as scoped `@segment/*`. +- Keep public APIs typed and documented; colocate utilities with their feature module (e.g., `src/plugins`, `src/__tests__`). + +## Testing Guidelines +- Unit tests use Jest with tests under `__tests__` near source; snapshots live in `__tests__/__snapshots__`. +- End-to-end coverage uses Detox in `examples/E2E`; build and run per platform before pushing. Add regression tests for new behaviors and keep existing snapshots updated only when intentional. + +## Commit & Pull Request Guidelines +- Commit messages follow Conventional Commits (`feat`, `fix`, `chore`, etc.); enforced by commitlint and release automation. +- For PRs, keep scope narrow, link issues when relevant, and note user-facing changes. Ensure `yarn lint`, `yarn typescript`, and the relevant `yarn test*`/Detox flows pass. Include screenshots only when UI changes affect the example app. + +## Security & Configuration Tips +- Do not commit real Segment write keys or private endpoints; use placeholder values in examples and tests. Keep secrets out of `examples/` and CI config. When testing proxies/CDN settings, prefer environment-driven config rather than hardcoding. diff --git a/env/android/.flox/.gitattributes b/env/android/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/android/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/android/.flox/.gitignore b/env/android/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/android/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/android/.flox/env.json b/env/android/.flox/env.json new file mode 100644 index 000000000..78a79f05b --- /dev/null +++ b/env/android/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "android", + "version": 1 +} diff --git a/env/android/.flox/env/manifest.lock b/env/android/.flox/env/manifest.lock new file mode 100644 index 000000000..8e7459b71 --- /dev/null +++ b/env/android/.flox/env/manifest.lock @@ -0,0 +1,100 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n \n set -euo pipefail\n\n if [ -z \"${DETOX_AVD:-}\" ]; then\n arch=\"$(uname -m)\"\n if [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n export DETOX_AVD=\"${ANDROID_AVD_LATEST_ARM:-medium_phone_API33_arm64_v8a}\"\n else\n export DETOX_AVD=\"${ANDROID_AVD_LATEST_X86:-medium_phone_API33_x86_64}\"\n fi\n fi\n " + }, + "profile": {}, + "options": {} + }, + "packages": [], + "compose": { + "composer": { + "version": 1, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " set -euo pipefail\n\n if [ -z \"${DETOX_AVD:-}\" ]; then\n arch=\"$(uname -m)\"\n if [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n export DETOX_AVD=\"${ANDROID_AVD_LATEST_ARM:-medium_phone_API33_arm64_v8a}\"\n else\n export DETOX_AVD=\"${ANDROID_AVD_LATEST_X86:-medium_phone_API33_x86_64}\"\n fi\n fi\n " + }, + "profile": {}, + "options": {}, + "include": { + "environments": [ + { + "dir": "./android-common" + }, + { + "dir": "./latest" + }, + { + "dir": "./min" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n " + }, + "profile": {}, + "options": {} + }, + "name": "android-common", + "descriptor": { + "dir": "./android-common" + } + }, + { + "manifest": { + "version": 1, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n " + }, + "profile": {}, + "options": {} + }, + "name": "latest", + "descriptor": { + "dir": "./latest" + } + }, + { + "manifest": { + "version": 1, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n " + }, + "profile": {}, + "options": {} + }, + "name": "min", + "descriptor": { + "dir": "./min" + } + } + ], + "warnings": [] + } +} diff --git a/env/android/.flox/env/manifest.toml b/env/android/.flox/env/manifest.toml new file mode 100644 index 000000000..1d8d43e54 --- /dev/null +++ b/env/android/.flox/env/manifest.toml @@ -0,0 +1,35 @@ +version = 1 + +[install] +[vars] +ANDROID_AVD_MIN = "pixel_API21_x86_64" +ANDROID_SYSTEM_IMAGE_MIN = "system-images;android-21;google_apis;x86_64" +ANDROID_AVD_LATEST_X86 = "medium_phone_API33_x86_64" +ANDROID_SYSTEM_IMAGE_LATEST_X86 = "system-images;android-33;google_apis;x86_64" +ANDROID_AVD_LATEST_ARM = "medium_phone_API33_arm64_v8a" +ANDROID_SYSTEM_IMAGE_LATEST_ARM = "system-images;android-33;google_apis;arm64-v8a" +ANDROID_EMULATOR_FLAGS = "-no-boot-anim -netdelay none -netspeed full -no-snapshot" +ANDROID_EMULATOR_HEADLESS_FLAGS = "-no-window -no-audio -gpu swiftshader_indirect" +[hook] + on-activate = ''' + set -euo pipefail + + if [ -z "${DETOX_AVD:-}" ]; then + arch="$(uname -m)" + if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then + export DETOX_AVD="${ANDROID_AVD_LATEST_ARM:-medium_phone_API33_arm64_v8a}" + else + export DETOX_AVD="${ANDROID_AVD_LATEST_X86:-medium_phone_API33_x86_64}" + fi + fi + ''' +[profile] +[services] +[include] +environments = [ + { dir = "./android-common" }, + { dir = "./latest" }, + { dir = "./min" }, +] +[build] +[options] diff --git a/env/android/android-common/.flox/.gitattributes b/env/android/android-common/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/android/android-common/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/android/android-common/.flox/.gitignore b/env/android/android-common/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/android/android-common/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/android/android-common/.flox/env.json b/env/android/android-common/.flox/env.json new file mode 100644 index 000000000..c97131699 --- /dev/null +++ b/env/android/android-common/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "android-common", + "version": 1 +} diff --git a/env/android/android-common/.flox/env/manifest.lock b/env/android/android-common/.flox/env/manifest.lock new file mode 100644 index 000000000..723c498b3 --- /dev/null +++ b/env/android/android-common/.flox/env/manifest.lock @@ -0,0 +1,685 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n " + }, + "profile": {}, + "options": {} + }, + "packages": [ + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/byb838v8rcxdql3w6cx153f9353x79hi-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:54.942580Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/v2xbkgrvn0b4g4qq7j5x60va0d4gf0kw-gradle-8.14.3" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/vvq6pjywqyxdk8zdbb217chzahg3iyck-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:21.362203Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/mvs8d5c60yyx3sxpppg1r67yjvlrrhhh-gradle-8.14.3" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/imj8fv0d6x3knhjh4sdw4hp5ax8ramhs-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:06.784996Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/jy3fpkvcymjaglzi9z2gbpzcyqypgfxh-gradle-8.14.3" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/hszbdb4bbpl6qw5li8wyrhf96vvfk2m4-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:21.844293Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/80fgl9ffaxlxl9s4i1jb37krcljx669g-gradle-8.14.3" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/87rnl1qkmwrkkzmk0xhnzwak8h9mxdsr-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:09.553266Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/s9nq23qm9animys49h7g7w660jz4ccwz-zulu-ca-jdk-17.0.12" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/sxpzi41bvnl26cy79j9zk3vvlslpbxnx-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:38.984999Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/x61h0zs6dawi6i6946c30p9qmn8r45q8-openjdk-17.0.17+10-debug", + "out": "/nix/store/qkzq9lxji4zs1dgdlxwwwknaggij5lag-openjdk-17.0.17+10" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/rq1jxlr68pjj9ws31zazwgam60s3smn0-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:21.121887Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/n1rp0ay6dp66yvr2dzwn840hcnpk8010-zulu-ca-jdk-17.0.12" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/p4fc4qy06b89x4yg2kfch2fypfl73iz1-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:40.942126Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/7hk6cjcmfgml2nq293g7cdsx8nrab3ir-openjdk-17.0.17+10-debug", + "out": "/nix/store/4xlra07s99b60kj0md6drgh0qmrkdpby-openjdk-17.0.17+10" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "install": { + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n " + }, + "profile": {}, + "options": {}, + "include": { + "environments": [ + { + "dir": "../../common" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "common", + "descriptor": { + "dir": "../../common" + } + } + ], + "warnings": [] + } +} diff --git a/env/android/android-common/.flox/env/manifest.toml b/env/android/android-common/.flox/env/manifest.toml new file mode 100644 index 000000000..cbce75d64 --- /dev/null +++ b/env/android/android-common/.flox/env/manifest.toml @@ -0,0 +1,31 @@ +version = 1 +[install] +gradle.pkg-path = "gradle" +jdk17.pkg-path = "jdk17" +[vars] +ANDROID_AVD_MIN = "pixel_API21_x86_64" +ANDROID_SYSTEM_IMAGE_MIN = "system-images;android-21;google_apis;x86_64" +ANDROID_AVD_LATEST_X86 = "medium_phone_API33_x86_64" +ANDROID_SYSTEM_IMAGE_LATEST_X86 = "system-images;android-33;google_apis;x86_64" +ANDROID_AVD_LATEST_ARM = "medium_phone_API33_arm64_v8a" +ANDROID_SYSTEM_IMAGE_LATEST_ARM = "system-images;android-33;google_apis;arm64-v8a" +ANDROID_EMULATOR_FLAGS = "-no-boot-anim -netdelay none -netspeed full -no-snapshot" +ANDROID_EMULATOR_HEADLESS_FLAGS = "-no-window -no-audio -gpu swiftshader_indirect" +[hook] + on-activate = ''' + set -euo pipefail + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + if [ ! -d "$project_root/env/android" ]; then + project_root="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../../../../.." && pwd)" + fi + export PROJECT_ROOT="$project_root" + source "$project_root/env/android/android-common/setup.sh" + ''' +[profile] +[services] +[include] +environments = [ + { dir = "../../common" } +] +[build] +[options] diff --git a/env/android/android-common/setup.sh b/env/android/android-common/setup.sh new file mode 100644 index 000000000..7f5a60997 --- /dev/null +++ b/env/android/android-common/setup.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +set -euo pipefail + +project_root="${PROJECT_ROOT:-}" +if [ -z "$project_root" ] && command -v git >/dev/null 2>&1; then + project_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" +fi +if [ -z "$project_root" ]; then + project_root="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../../.." && pwd)" +fi +export PROJECT_ROOT="$project_root" +export DEVBOX_PROJECT_ROOT="$project_root" + +# Use the device helper to set SDK + PATH without starting anything. +if [ -f "$project_root/scripts/android.sh" ]; then + # shellcheck disable=SC1091 + . "$project_root/scripts/android.sh" +fi + +if [ -n "${ANDROID_SDK_ROOT:-}" ]; then + if [ -z "${ANDROID_AVD_HOME:-}" ]; then + avd_home="${FLOX_ENV_CACHE:-$HOME/.flox/cache}/android/avd" + mkdir -p "$avd_home" + export ANDROID_AVD_HOME="$avd_home" + fi + if [ -z "${ANDROID_USER_HOME:-}" ]; then + export ANDROID_USER_HOME="${ANDROID_AVD_HOME:-$HOME/.android}" + fi +fi + +# Default DETOX_AVD based on arch if not set. +if [ -z "${DETOX_AVD:-}" ]; then + arch="$(uname -m)" + if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then + export DETOX_AVD="${ANDROID_AVD_LATEST_ARM:-medium_phone_API33_arm64_v8a}" + else + export DETOX_AVD="${ANDROID_AVD_LATEST_X86:-medium_phone_API33_x86_64}" + fi +fi diff --git a/env/android/latest/.flox/.gitattributes b/env/android/latest/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/android/latest/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/android/latest/.flox/.gitignore b/env/android/latest/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/android/latest/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/android/latest/.flox/env.json b/env/android/latest/.flox/env.json new file mode 100644 index 000000000..5089b0bf2 --- /dev/null +++ b/env/android/latest/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "latest", + "version": 1 +} diff --git a/env/android/latest/.flox/env/manifest.lock b/env/android/latest/.flox/env/manifest.lock new file mode 100644 index 000000000..9802d82a9 --- /dev/null +++ b/env/android/latest/.flox/env/manifest.lock @@ -0,0 +1,805 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/latest" + }, + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"medium_phone_API33_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"medium_phone_API33_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_LATEST:-$default_avd}}\" EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + } + }, + "packages": [ + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/byb838v8rcxdql3w6cx153f9353x79hi-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:54.942580Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/v2xbkgrvn0b4g4qq7j5x60va0d4gf0kw-gradle-8.14.3" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/vvq6pjywqyxdk8zdbb217chzahg3iyck-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:21.362203Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/mvs8d5c60yyx3sxpppg1r67yjvlrrhhh-gradle-8.14.3" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/imj8fv0d6x3knhjh4sdw4hp5ax8ramhs-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:06.784996Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/jy3fpkvcymjaglzi9z2gbpzcyqypgfxh-gradle-8.14.3" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/hszbdb4bbpl6qw5li8wyrhf96vvfk2m4-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:21.844293Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/80fgl9ffaxlxl9s4i1jb37krcljx669g-gradle-8.14.3" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/87rnl1qkmwrkkzmk0xhnzwak8h9mxdsr-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:09.553266Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/s9nq23qm9animys49h7g7w660jz4ccwz-zulu-ca-jdk-17.0.12" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/sxpzi41bvnl26cy79j9zk3vvlslpbxnx-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:38.984999Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/x61h0zs6dawi6i6946c30p9qmn8r45q8-openjdk-17.0.17+10-debug", + "out": "/nix/store/qkzq9lxji4zs1dgdlxwwwknaggij5lag-openjdk-17.0.17+10" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/rq1jxlr68pjj9ws31zazwgam60s3smn0-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:21.121887Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/n1rp0ay6dp66yvr2dzwn840hcnpk8010-zulu-ca-jdk-17.0.12" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/p4fc4qy06b89x4yg2kfch2fypfl73iz1-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:40.942126Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/7hk6cjcmfgml2nq293g7cdsx8nrab3ir-openjdk-17.0.17+10-debug", + "out": "/nix/store/4xlra07s99b60kj0md6drgh0qmrkdpby-openjdk-17.0.17+10" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/latest", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.aarch64-darwin.default", + "derivation": "/nix/store/0l95fy1ffhir9i3bc58gsi8mnpcz5py2-androidsdk.drv", + "outputs": { + "out": "/nix/store/jiyz1w3ilgr67zmmliy49acq920wg9s0-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-darwin", + "system": "aarch64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/latest", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.aarch64-linux.default", + "derivation": "/nix/store/6w6v5wwvmpjbxciw00jqywnnnmsxfvh2-androidsdk.drv", + "outputs": { + "out": "/nix/store/c1r7y7yv0x9wi1rhhkkh1a390mnfl1ry-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-linux", + "system": "aarch64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/latest", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.x86_64-darwin.default", + "derivation": "/nix/store/d3gwnrkzsk0179m6w13pm0n0k7j7a3ri-androidsdk.drv", + "outputs": { + "out": "/nix/store/4sp4dl3b96qbqkksf964524yxn6s7rvw-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-darwin", + "system": "x86_64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/latest", + "flake-description": "Android SDK (API 33) for flox", + "locked-flake-attr-path": "packages.x86_64-linux.default", + "derivation": "/nix/store/pm23dkchhl3fyzp08bymifcrci3y6ji4-androidsdk.drv", + "outputs": { + "out": "/nix/store/fc9z39c2c6hbmn1yfh6h4h1dzv9g37zp-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-linux", + "system": "x86_64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/latest" + } + }, + "hook": { + "on-activate": " project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"medium_phone_API33_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"medium_phone_API33_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_LATEST:-$default_avd}}\" EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + }, + "include": { + "environments": [ + { + "dir": "../android-common" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n " + }, + "profile": {}, + "options": {} + }, + "name": "android-common", + "descriptor": { + "dir": "../android-common" + } + } + ], + "warnings": [] + } +} diff --git a/env/android/latest/.flox/env/manifest.toml b/env/android/latest/.flox/env/manifest.toml new file mode 100644 index 000000000..5671fd7a3 --- /dev/null +++ b/env/android/latest/.flox/env/manifest.toml @@ -0,0 +1,38 @@ +version = 1 +[install] +android-sdk.flake = "path:env/android/latest" +[vars] +[hook] + on-activate = ''' + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + if [ -f "$project_root/scripts/android.sh" ]; then + # shellcheck disable=SC1091 + . "$project_root/scripts/android.sh" + fi + ''' +[profile] +[services] +android-emulator-latest.command = """ +bash -lc ' +set -euo pipefail + +project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" +cd "$project_root" + +arch="$(uname -m)" +default_avd="medium_phone_API33_x86_64" +if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then + default_avd="medium_phone_API33_arm64_v8a" +fi + +DETOX_AVD="${DETOX_AVD:-${ANDROID_AVD_LATEST:-$default_avd}}" \ +EMU_FOREGROUND=1 \ +bash "$project_root/scripts/android.sh" start +' +""" +[include] +environments = [ + { dir = "../android-common" } +] +[build] +[options] diff --git a/env/android/latest/flake.lock b/env/android/latest/flake.lock new file mode 100644 index 000000000..862c7abb1 --- /dev/null +++ b/env/android/latest/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/env/android/latest/flake.nix b/env/android/latest/flake.nix new file mode 100644 index 000000000..e618219e4 --- /dev/null +++ b/env/android/latest/flake.nix @@ -0,0 +1,53 @@ +{ + description = "Android SDK (API 33) for flox"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = f: + builtins.listToAttrs (map (system: { + name = system; + value = f system; + }) systems); + in + { + packages = forAllSystems (system: + let + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + android_sdk.accept_license = true; + }; + }; + + abiVersions = + if builtins.match "aarch64-.*" system != null + then [ "arm64-v8a" ] + else [ "x86_64" ]; + + sdk = pkgs.androidenv.composeAndroidPackages { + platformVersions = [ "33" ]; + buildToolsVersions = [ "30.0.3" ]; + cmdLineToolsVersion = "19.0"; + includeEmulator = true; + includeSystemImages = true; + includeNDK = true; + abiVersions = abiVersions; + systemImageTypes = [ "google_apis" ]; + }; + in + { + android-sdk-latest = sdk.androidsdk; + default = sdk.androidsdk; + }); + }; +} diff --git a/env/android/min/.flox/.gitattributes b/env/android/min/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/android/min/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/android/min/.flox/.gitignore b/env/android/min/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/android/min/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/android/min/.flox/env.json b/env/android/min/.flox/env.json new file mode 100644 index 000000000..aa2d0e7a1 --- /dev/null +++ b/env/android/min/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "min", + "version": 1 +} diff --git a/env/android/min/.flox/env/manifest.lock b/env/android/min/.flox/env/manifest.lock new file mode 100644 index 000000000..68ac0e807 --- /dev/null +++ b/env/android/min/.flox/env/manifest.lock @@ -0,0 +1,805 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/min" + }, + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n \n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"pixel_API21_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"pixel_API21_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_MIN:-$default_avd}}\" AVD_FLAVOR=\"minsdk\" AVD_SKIP_SECONDARY=1 EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + } + }, + "packages": [ + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/byb838v8rcxdql3w6cx153f9353x79hi-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:54.942580Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/v2xbkgrvn0b4g4qq7j5x60va0d4gf0kw-gradle-8.14.3" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/vvq6pjywqyxdk8zdbb217chzahg3iyck-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:21.362203Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/mvs8d5c60yyx3sxpppg1r67yjvlrrhhh-gradle-8.14.3" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/imj8fv0d6x3knhjh4sdw4hp5ax8ramhs-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:06.784996Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/jy3fpkvcymjaglzi9z2gbpzcyqypgfxh-gradle-8.14.3" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "gradle", + "broken": false, + "derivation": "/nix/store/hszbdb4bbpl6qw5li8wyrhf96vvfk2m4-gradle-8.14.3.drv", + "description": "Enterprise-grade build system", + "install_id": "gradle", + "license": "Apache-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "gradle-8.14.3", + "pname": "gradle", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:21.844293Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "8.14.3", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/80fgl9ffaxlxl9s4i1jb37krcljx669g-gradle-8.14.3" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/87rnl1qkmwrkkzmk0xhnzwak8h9mxdsr-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:09.553266Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/s9nq23qm9animys49h7g7w660jz4ccwz-zulu-ca-jdk-17.0.12" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/sxpzi41bvnl26cy79j9zk3vvlslpbxnx-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:38.984999Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/x61h0zs6dawi6i6946c30p9qmn8r45q8-openjdk-17.0.17+10-debug", + "out": "/nix/store/qkzq9lxji4zs1dgdlxwwwknaggij5lag-openjdk-17.0.17+10" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/rq1jxlr68pjj9ws31zazwgam60s3smn0-zulu-ca-jdk-17.0.12.drv", + "description": "Certified builds of OpenJDK", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "zulu-ca-jdk-17.0.12", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:21.121887Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.12", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/n1rp0ay6dp66yvr2dzwn840hcnpk8010-zulu-ca-jdk-17.0.12" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "jdk17", + "broken": false, + "derivation": "/nix/store/p4fc4qy06b89x4yg2kfch2fypfl73iz1-openjdk-17.0.17+10.drv", + "description": "Open-source Java Development Kit", + "install_id": "jdk17", + "license": "GPL-2.0-only", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "openjdk-17.0.17+10", + "pname": "jdk17", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:40.942126Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "17.0.17+10", + "outputs_to_install": [ + "out" + ], + "outputs": { + "debug": "/nix/store/7hk6cjcmfgml2nq293g7cdsx8nrab3ir-openjdk-17.0.17+10-debug", + "out": "/nix/store/4xlra07s99b60kj0md6drgh0qmrkdpby-openjdk-17.0.17+10" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/min", + "flake-description": "Android SDK (API 21) for flox", + "locked-flake-attr-path": "packages.aarch64-darwin.default", + "derivation": "/nix/store/s7n6xvyqis03q6k2n7ar59whyj52nfm4-androidsdk.drv", + "outputs": { + "out": "/nix/store/mipbvgkgjzpwsnr2f1smcndkjnxhrwbs-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-darwin", + "system": "aarch64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/min", + "flake-description": "Android SDK (API 21) for flox", + "locked-flake-attr-path": "packages.aarch64-linux.default", + "derivation": "/nix/store/hicxc36mlbzbi1mr2y2gcfl0f6ng9ksv-androidsdk.drv", + "outputs": { + "out": "/nix/store/gwlch7w3qpj6g4fi5w4kb23c0fajmq6y-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "aarch64-linux", + "system": "aarch64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/min", + "flake-description": "Android SDK (API 21) for flox", + "locked-flake-attr-path": "packages.x86_64-darwin.default", + "derivation": "/nix/store/1n5111imc6aiaqvq2ri8ywmk4arfncxs-androidsdk.drv", + "outputs": { + "out": "/nix/store/snjscbghhz17svlva3jqflrvhm2r4swc-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-darwin", + "system": "x86_64-darwin", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + }, + { + "install_id": "android-sdk", + "locked-url": "path:env/android/min", + "flake-description": "Android SDK (API 21) for flox", + "locked-flake-attr-path": "packages.x86_64-linux.default", + "derivation": "/nix/store/dxld1kpxp5xpq8pv2bl62f2ylxygmzzg-androidsdk.drv", + "outputs": { + "out": "/nix/store/g1mqc22l4b6d3c9azs0pk8mbk0ghmi9c-androidsdk" + }, + "output-names": [ + "out" + ], + "outputs-to-install": [ + "out" + ], + "requested-outputs-to-install": [], + "package-system": "x86_64-linux", + "system": "x86_64-linux", + "name": "androidsdk", + "pname": "android-sdk-cmdline-tools", + "version": "19.0", + "description": "Android SDK tools, packaged in Nixpkgs", + "broken": false, + "unfree": true, + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "install": { + "android-sdk": { + "flake": "path:env/android/min" + } + }, + "hook": { + "on-activate": " project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ -f \"$project_root/scripts/android.sh\" ]; then\n # shellcheck disable=SC1091\n . \"$project_root/scripts/android.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "services": { + "android-emulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\narch=\"$(uname -m)\"\ndefault_avd=\"pixel_API21_x86_64\"\nif [ \"$arch\" = \"arm64\" ] || [ \"$arch\" = \"aarch64\" ]; then\n default_avd=\"pixel_API21_arm64_v8a\"\nfi\n\nDETOX_AVD=\"${DETOX_AVD:-${ANDROID_AVD_MIN:-$default_avd}}\" AVD_FLAVOR=\"minsdk\" AVD_SKIP_SECONDARY=1 EMU_FOREGROUND=1 bash \"$project_root/scripts/android.sh\" start\n'\n" + } + }, + "include": { + "environments": [ + { + "dir": "../android-common" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "gradle": { + "pkg-path": "gradle" + }, + "jdk17": { + "pkg-path": "jdk17" + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "ANDROID_AVD_LATEST_ARM": "medium_phone_API33_arm64_v8a", + "ANDROID_AVD_LATEST_X86": "medium_phone_API33_x86_64", + "ANDROID_AVD_MIN": "pixel_API21_x86_64", + "ANDROID_EMULATOR_FLAGS": "-no-boot-anim -netdelay none -netspeed full -no-snapshot", + "ANDROID_EMULATOR_HEADLESS_FLAGS": "-no-window -no-audio -gpu swiftshader_indirect", + "ANDROID_SYSTEM_IMAGE_LATEST_ARM": "system-images;android-33;google_apis;arm64-v8a", + "ANDROID_SYSTEM_IMAGE_LATEST_X86": "system-images;android-33;google_apis;x86_64", + "ANDROID_SYSTEM_IMAGE_MIN": "system-images;android-21;google_apis;x86_64" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/android\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n source \"$project_root/env/android/android-common/setup.sh\"\n " + }, + "profile": {}, + "options": {} + }, + "name": "android-common", + "descriptor": { + "dir": "../android-common" + } + } + ], + "warnings": [] + } +} diff --git a/env/android/min/.flox/env/manifest.toml b/env/android/min/.flox/env/manifest.toml new file mode 100644 index 000000000..412ab216b --- /dev/null +++ b/env/android/min/.flox/env/manifest.toml @@ -0,0 +1,40 @@ +version = 1 +[install] +android-sdk.flake = "path:env/android/min" +[vars] +[hook] + on-activate = ''' + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + if [ -f "$project_root/scripts/android.sh" ]; then + # shellcheck disable=SC1091 + . "$project_root/scripts/android.sh" + fi + ''' +[profile] +[services] +android-emulator-min.command = """ +bash -lc ' +set -euo pipefail + +project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" +cd "$project_root" + +arch="$(uname -m)" +default_avd="pixel_API21_x86_64" +if [ "$arch" = "arm64" ] || [ "$arch" = "aarch64" ]; then + default_avd="pixel_API21_arm64_v8a" +fi + +DETOX_AVD="${DETOX_AVD:-${ANDROID_AVD_MIN:-$default_avd}}" \ +AVD_FLAVOR="minsdk" \ +AVD_SKIP_SECONDARY=1 \ +EMU_FOREGROUND=1 \ +bash "$project_root/scripts/android.sh" start +' +""" +[include] +environments = [ + { dir = "../android-common" } +] +[build] +[options] diff --git a/env/android/min/flake.lock b/env/android/min/flake.lock new file mode 100644 index 000000000..862c7abb1 --- /dev/null +++ b/env/android/min/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/env/android/min/flake.nix b/env/android/min/flake.nix new file mode 100644 index 000000000..801d7610e --- /dev/null +++ b/env/android/min/flake.nix @@ -0,0 +1,53 @@ +{ + description = "Android SDK (API 21) for flox"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = f: + builtins.listToAttrs (map (system: { + name = system; + value = f system; + }) systems); + in + { + packages = forAllSystems (system: + let + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + android_sdk.accept_license = true; + }; + }; + + abiVersions = + if builtins.match "aarch64-.*" system != null + then [ "arm64-v8a" ] + else [ "x86_64" ]; + + sdk = pkgs.androidenv.composeAndroidPackages { + platformVersions = [ "21" ]; + buildToolsVersions = [ "30.0.3" ]; + cmdLineToolsVersion = "19.0"; + includeEmulator = true; + includeSystemImages = true; + includeNDK = true; + abiVersions = abiVersions; + systemImageTypes = [ "google_apis" ]; + }; + in + { + android-sdk-min = sdk.androidsdk; + default = sdk.androidsdk; + }); + }; +} diff --git a/env/common/.flox/.gitattributes b/env/common/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/common/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/common/.flox/.gitignore b/env/common/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/common/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/common/.flox/env.json b/env/common/.flox/env.json new file mode 100644 index 000000000..ebc20a5bf --- /dev/null +++ b/env/common/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "common", + "version": 1 +} diff --git a/env/common/.flox/env/manifest.lock b/env/common/.flox/env/manifest.lock new file mode 100644 index 000000000..ee9318072 --- /dev/null +++ b/env/common/.flox/env/manifest.lock @@ -0,0 +1,372 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n " + }, + "profile": {}, + "options": {} + }, + "packages": [ + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ] +} diff --git a/env/common/.flox/env/manifest.toml b/env/common/.flox/env/manifest.toml new file mode 100644 index 000000000..ab95ececb --- /dev/null +++ b/env/common/.flox/env/manifest.toml @@ -0,0 +1,67 @@ +version = 1 + + +[install] +treefmt.pkg-path = "treefmt" +nixfmt.pkg-path = "nixfmt-rfc-style" +shfmt.pkg-path = "shfmt" + + +[vars] + +[hook] + on-activate = ''' + export ROOT_PROJECT=$(git rev-parse --show-toplevel) + script() { + local name="${1:-}" + shift || true + if [ -z "$name" ]; then + echo "Usage: script [args...] (runs scripts/.sh)" >&2 + return 1 + fi + local project_root="${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + local path="$project_root/scripts/${name}.sh" + if [ ! -x "$path" ]; then + echo "script: $path not found or not executable" >&2 + return 1 + fi + "$path" "$@" + } + # Ensure Yarn 4 from the env wins over any host Yarn 1.x + clean_path="$(printf '%s' "$PATH" | tr ':' '\n' | grep -v '/.yarn/bin' | paste -sd: -)" + export COREPACK_HOME="$HOME/.local/share/corepack" + mkdir -p "$HOME/.local/bin" "$COREPACK_HOME" + # Prefer the env-provided yarn binary explicitly if present. + if command -v yarn >/dev/null 2>&1; then + yarn_dir="$(dirname "$(command -v yarn)")" + export PATH="$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path" + else + export PATH="$HOME/.local/bin:$COREPACK_HOME:$clean_path" + fi + if command -v corepack >/dev/null 2>&1; then + corepack enable --install-directory "$HOME/.local/bin" >/dev/null 2>&1 || true + corepack prepare "yarn@4.12.0" --activate --install-directory "$HOME/.local/bin" >/dev/null 2>&1 || true + hash -r + fi + ''' + + +[profile] + + +[services] +[include] + + +[build] +# [build.myproject] +# description = "The coolest project ever" +# version = "0.0.1" +# command = """ +# mkdir -p $out/bin +# cargo build --release +# cp target/release/myproject $out/bin/myproject +# """ + + +[options] diff --git a/env/ios/.flox/.gitattributes b/env/ios/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/ios/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/ios/.flox/.gitignore b/env/ios/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/ios/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/ios/.flox/env.json b/env/ios/.flox/env.json new file mode 100644 index 000000000..75d1b249b --- /dev/null +++ b/env/ios/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "ios", + "version": 1 +} diff --git a/env/ios/.flox/env/manifest.lock b/env/ios/.flox/env/manifest.lock new file mode 100644 index 000000000..cea90ff20 --- /dev/null +++ b/env/ios/.flox/env/manifest.lock @@ -0,0 +1,497 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n " + }, + "profile": {}, + "options": {} + }, + "packages": [ + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/256rcn7cqsimacisbfw0am6p9k3c1bg4-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:53.946649Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/av5g6hfp0yiir3iavg72js70ian8hxyf-cocoapods-1.16.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/ksmn2n54sby6rxxs3j515hz68j7s7x8x-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:05.777201Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/har71589bwmh6h6skisd20b3c6lrwmz7-cocoapods-1.16.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + } + }, + "vars": { + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " set -euo pipefail\n unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n " + }, + "profile": {}, + "options": {}, + "include": { + "environments": [ + { + "dir": "../common" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "common", + "descriptor": { + "dir": "../common" + } + } + ], + "warnings": [] + } +} \ No newline at end of file diff --git a/env/ios/.flox/env/manifest.toml b/env/ios/.flox/env/manifest.toml new file mode 100644 index 000000000..d85a49ded --- /dev/null +++ b/env/ios/.flox/env/manifest.toml @@ -0,0 +1,48 @@ +version = 1 + + +[install] +cocoapods.pkg-path = "cocoapods" +cocoapods.systems = ["x86_64-darwin", "aarch64-darwin"] + + +[vars] +IOS_SIM_LATEST_DEVICE = "iPhone 17" + + +[hook] + on-activate = ''' + set -euo pipefail + + # Prefer system toolchains for iOS builds; avoid Nix C toolchain flags leaking into xcodebuild. + unset NIX_CFLAGS_COMPILE NIX_LDFLAGS NIX_CFLAGS_LINK LIBRARY_PATH + + project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" + if [ ! -d "$project_root/env/ios" ]; then + project_root="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../../../../.." && pwd)" + fi + export PROJECT_ROOT="$project_root" + if [ -f "$project_root/scripts/ios.sh" ]; then + source "$project_root/scripts/ios.sh" + elif [ -f "$project_root/env/ios/setup.sh" ]; then + source "$project_root/env/ios/setup.sh" + fi + ''' + + +[profile] + + +[services] + + +[include] +environments = [ + { dir = "../common" } +] + + +[build] + + +[options] diff --git a/env/ios/latest/.flox/.gitattributes b/env/ios/latest/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/ios/latest/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/ios/latest/.flox/.gitignore b/env/ios/latest/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/ios/latest/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/ios/latest/.flox/env.json b/env/ios/latest/.flox/env.json new file mode 100644 index 000000000..5089b0bf2 --- /dev/null +++ b/env/ios/latest/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "latest", + "version": 1 +} diff --git a/env/ios/latest/.flox/env/manifest.lock b/env/ios/latest/.flox/env/manifest.lock new file mode 100644 index 000000000..16c7071d7 --- /dev/null +++ b/env/ios/latest/.flox/env/manifest.lock @@ -0,0 +1,819 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "vars": { + "IOS_SIM_DEVICE": "iPhone 17", + "IOS_SIM_LATEST_DEVICE": "iPhone 17", + "IOS_SIM_RUNTIME": "26.1" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n yarn\n " + }, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=latest IOS_DOWNLOAD_RUNTIME=1 bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + } + }, + "packages": [ + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/256rcn7cqsimacisbfw0am6p9k3c1bg4-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:53.946649Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/av5g6hfp0yiir3iavg72js70ian8hxyf-cocoapods-1.16.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/ksmn2n54sby6rxxs3j515hz68j7s7x8x-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:05.777201Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/har71589bwmh6h6skisd20b3c6lrwmz7-cocoapods-1.16.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/ws40yy01bbw9sjd7y93byf8a15hv0m65-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:17.356063Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/fsrayxzszxaqcm5k849c33qncvr22rf1-nodejs-20.20.0-dev", + "libv8": "/nix/store/8dmg3m6pxx6g850dr572fbnkkb7l4qx9-nodejs-20.20.0-libv8", + "out": "/nix/store/l5zcv2mlpz4vkfr8gaznjl4l09pw7qva-nodejs-20.20.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/6wvfvavgqcd53gw4njxm1zc1cp3jg9ar-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:54.630769Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/6qd7afr0a8mw1y4lnddv380nb1yxg7mn-nodejs-20.20.0-dev", + "libv8": "/nix/store/9afma3lnsdzfscr8783lwcqydad477m5-nodejs-20.20.0-libv8", + "out": "/nix/store/8bcjyh3wm6172gch2hmjaw70786vnn0p-nodejs-20.20.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/m33808ahw4wxd0vz9brws07q39z0b76n-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:28.651760Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/q91w4zkkd52829lcx3c1m9k1b2clgv3r-nodejs-20.20.0-dev", + "libv8": "/nix/store/bl853ghmyam6zc9kpr8hq7dk8mdsnddi-nodejs-20.20.0-libv8", + "out": "/nix/store/nfpj0w7ckamxpbzci2y9zsrlsw1yjgsa-nodejs-20.20.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/38nz5j3pxcj6lcgqypvi4pakf6gnqw2g-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:59.682402Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/mha8cz3kq9pnnns2f4ygsdl911nnc9nn-nodejs-20.20.0-dev", + "libv8": "/nix/store/y8syar3i7lnw6ys8akhq252zznlfv0p7-nodejs-20.20.0-libv8", + "out": "/nix/store/jfar9wnj6kvr0gr6klh1gk7vgckkfr5j-nodejs-20.20.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/sy0jbfhah2dkmxf9ngd4j5wpymj61s8z-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:38.337965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2l7sbyyqardvrzr35zkrw67gbng5gb8y-yarn-berry-4.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/jzxis6qs5mb2lc9lx7xndv5vqmkx10x0-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:45.606272Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/klx9ndw1djgx0zhhyrkcn9an094rmmwv-yarn-berry-4.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/pjdps1mpblxfbmppb8b5wds8mzzjar2m-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:38.743524Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/m6cwiya6hrbwnlprh2cbnmz6c7mkylrf-yarn-berry-4.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/v5xk5ivmrak80ppdcz4jpindj21xy6va-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:24:08.258012Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/q1gys3zgijcciiafbh9nfawkx5wj8179-yarn-berry-4.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "vars": { + "IOS_SIM_DEVICE": "iPhone 17", + "IOS_SIM_RUNTIME": "26.1" + }, + "hook": {}, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-latest": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=latest IOS_DOWNLOAD_RUNTIME=1 bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + }, + "include": { + "environments": [ + { + "dir": ".." + }, + { + "dir": "../../nodejs" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "ios", + "descriptor": { + "dir": ".." + } + }, + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n yarn\n " + }, + "profile": {}, + "options": {} + }, + "name": "nodejs", + "descriptor": { + "dir": "../../nodejs" + } + } + ], + "warnings": [ + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "nodejs" + } + ] + } +} diff --git a/env/ios/latest/.flox/env/manifest.toml b/env/ios/latest/.flox/env/manifest.toml new file mode 100644 index 000000000..42d0040a6 --- /dev/null +++ b/env/ios/latest/.flox/env/manifest.toml @@ -0,0 +1,26 @@ +version = 1 + +[install] +[vars] +IOS_SIM_DEVICE = "iPhone 17" +IOS_SIM_RUNTIME = "26.1" +[hook] +[profile] +[services] +ios-simulator-latest.command = """ +bash -lc ' +set -euo pipefail + +project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" +cd "$project_root" + +IOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=latest IOS_DOWNLOAD_RUNTIME=1 bash "$project_root/scripts/ios.sh" start +' +""" +[include] +environments = [ + { dir = ".." }, + { dir = "../../nodejs" }, +] +[build] +[options] diff --git a/env/ios/min/.flox/.gitattributes b/env/ios/min/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/ios/min/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/ios/min/.flox/.gitignore b/env/ios/min/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/ios/min/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/ios/min/.flox/env.json b/env/ios/min/.flox/env.json new file mode 100644 index 000000000..aa2d0e7a1 --- /dev/null +++ b/env/ios/min/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "min", + "version": 1 +} diff --git a/env/ios/min/.flox/env/manifest.lock b/env/ios/min/.flox/env/manifest.lock new file mode 100644 index 000000000..530513fc4 --- /dev/null +++ b/env/ios/min/.flox/env/manifest.lock @@ -0,0 +1,817 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "vars": { + "IOS_SIM_DEVICE": "iPhone 14", + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n \n export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n yarn\n " + }, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=minsdk bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + } + }, + "packages": [ + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/256rcn7cqsimacisbfw0am6p9k3c1bg4-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:27:53.946649Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/av5g6hfp0yiir3iavg72js70ian8hxyf-cocoapods-1.16.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "cocoapods", + "broken": false, + "derivation": "/nix/store/ksmn2n54sby6rxxs3j515hz68j7s7x8x-cocoapods-1.16.2.drv", + "description": "Manages dependencies for your Xcode projects", + "install_id": "cocoapods", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "cocoapods-1.16.2", + "pname": "cocoapods", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:05.777201Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.16.2", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/har71589bwmh6h6skisd20b3c6lrwmz7-cocoapods-1.16.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/ws40yy01bbw9sjd7y93byf8a15hv0m65-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:17.356063Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/fsrayxzszxaqcm5k849c33qncvr22rf1-nodejs-20.20.0-dev", + "libv8": "/nix/store/8dmg3m6pxx6g850dr572fbnkkb7l4qx9-nodejs-20.20.0-libv8", + "out": "/nix/store/l5zcv2mlpz4vkfr8gaznjl4l09pw7qva-nodejs-20.20.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/6wvfvavgqcd53gw4njxm1zc1cp3jg9ar-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:54.630769Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/6qd7afr0a8mw1y4lnddv380nb1yxg7mn-nodejs-20.20.0-dev", + "libv8": "/nix/store/9afma3lnsdzfscr8783lwcqydad477m5-nodejs-20.20.0-libv8", + "out": "/nix/store/8bcjyh3wm6172gch2hmjaw70786vnn0p-nodejs-20.20.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/m33808ahw4wxd0vz9brws07q39z0b76n-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:28.651760Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/q91w4zkkd52829lcx3c1m9k1b2clgv3r-nodejs-20.20.0-dev", + "libv8": "/nix/store/bl853ghmyam6zc9kpr8hq7dk8mdsnddi-nodejs-20.20.0-libv8", + "out": "/nix/store/nfpj0w7ckamxpbzci2y9zsrlsw1yjgsa-nodejs-20.20.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/38nz5j3pxcj6lcgqypvi4pakf6gnqw2g-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:59.682402Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/mha8cz3kq9pnnns2f4ygsdl911nnc9nn-nodejs-20.20.0-dev", + "libv8": "/nix/store/y8syar3i7lnw6ys8akhq252zznlfv0p7-nodejs-20.20.0-libv8", + "out": "/nix/store/jfar9wnj6kvr0gr6klh1gk7vgckkfr5j-nodejs-20.20.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/sy0jbfhah2dkmxf9ngd4j5wpymj61s8z-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:38.337965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2l7sbyyqardvrzr35zkrw67gbng5gb8y-yarn-berry-4.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/jzxis6qs5mb2lc9lx7xndv5vqmkx10x0-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:45.606272Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/klx9ndw1djgx0zhhyrkcn9an094rmmwv-yarn-berry-4.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/pjdps1mpblxfbmppb8b5wds8mzzjar2m-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:38.743524Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/m6cwiya6hrbwnlprh2cbnmz6c7mkylrf-yarn-berry-4.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/v5xk5ivmrak80ppdcz4jpindj21xy6va-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:24:08.258012Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/q1gys3zgijcciiafbh9nfawkx5wj8179-yarn-berry-4.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "vars": { + "IOS_SIM_DEVICE": "iPhone 14" + }, + "hook": {}, + "profile": {}, + "options": {}, + "services": { + "ios-simulator-min": { + "command": "bash -lc '\nset -euo pipefail\n\nproject_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\ncd \"$project_root\"\n\nIOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=minsdk bash \"$project_root/scripts/ios.sh\" start\n'\n" + } + }, + "include": { + "environments": [ + { + "dir": ".." + }, + { + "dir": "../../nodejs" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "cocoapods": { + "pkg-path": "cocoapods", + "systems": [ + "x86_64-darwin", + "aarch64-darwin" + ] + }, + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "vars": { + "IOS_SIM_LATEST_DEVICE": "iPhone 17" + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n set -euo pipefail\n project_root=\"${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n if [ ! -d \"$project_root/env/ios\" ]; then\n project_root=\"$(cd \"$(dirname \"${BASH_SOURCE[0]:-$0}\")/../../../../..\" && pwd)\"\n fi\n export PROJECT_ROOT=\"$project_root\"\n if [ -f \"$project_root/scripts/ios.sh\" ]; then\n source \"$project_root/scripts/ios.sh\"\n elif [ -f \"$project_root/env/ios/setup.sh\" ]; then\n source \"$project_root/env/ios/setup.sh\"\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "ios", + "descriptor": { + "dir": ".." + } + }, + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n yarn\n " + }, + "profile": {}, + "options": {} + }, + "name": "nodejs", + "descriptor": { + "dir": "../../nodejs" + } + } + ], + "warnings": [ + { + "warning": { + "Overriding": [ + "install", + "nixfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "shfmt" + ] + }, + "higher_priority_name": "nodejs" + }, + { + "warning": { + "Overriding": [ + "install", + "treefmt" + ] + }, + "higher_priority_name": "nodejs" + } + ] + } +} diff --git a/env/ios/min/.flox/env/manifest.toml b/env/ios/min/.flox/env/manifest.toml new file mode 100644 index 000000000..0078d5c97 --- /dev/null +++ b/env/ios/min/.flox/env/manifest.toml @@ -0,0 +1,25 @@ +version = 1 + +[install] +[vars] +IOS_SIM_DEVICE = "iPhone 14" +[hook] +[profile] +[services] +ios-simulator-min.command = """ +bash -lc ' +set -euo pipefail + +project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" +cd "$project_root" + +IOS_MANAGER_FOREGROUND=1 IOS_FLAVOR=minsdk bash "$project_root/scripts/ios.sh" start +' +""" +[include] +environments = [ + { dir = ".." }, + { dir = "../../nodejs" }, +] +[build] +[options] diff --git a/env/ios/setup.sh b/env/ios/setup.sh new file mode 100644 index 000000000..cb9074ff0 --- /dev/null +++ b/env/ios/setup.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -euo pipefail + +project_root="${PROJECT_ROOT:-}" +if [ -z "$project_root" ] && command -v git >/dev/null 2>&1; then + project_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" +fi +if [ -z "$project_root" ]; then + project_root="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../.." && pwd)" +fi +export PROJECT_ROOT="$project_root" + +if [ -z "${DETOX_IOS_DEVICE:-}" ]; then + export DETOX_IOS_DEVICE="${IOS_SIM_DEVICE:-${IOS_SIM_LATEST_DEVICE:-iPhone 17}}" +fi diff --git a/env/nodejs/.flox/.gitattributes b/env/nodejs/.flox/.gitattributes new file mode 100644 index 000000000..bb5491e19 --- /dev/null +++ b/env/nodejs/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/env/nodejs/.flox/.gitignore b/env/nodejs/.flox/.gitignore new file mode 100644 index 000000000..8d2118683 --- /dev/null +++ b/env/nodejs/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/env/nodejs/.flox/env.json b/env/nodejs/.flox/env.json new file mode 100644 index 000000000..9c6fb9bd5 --- /dev/null +++ b/env/nodejs/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "nodejs", + "version": 1 +} diff --git a/env/nodejs/.flox/env/manifest.lock b/env/nodejs/.flox/env/manifest.lock new file mode 100644 index 000000000..13c413652 --- /dev/null +++ b/env/nodejs/.flox/env/manifest.lock @@ -0,0 +1,673 @@ +{ + "lockfile-version": 1, + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "node": { + "pkg-path": "nodejs_20" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n \n " + }, + "profile": {}, + "options": {} + }, + "packages": [ + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/awh5fy1i2xnh52pxkzj8mghxaqd7skx3-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:16.356813Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/4jzq73b6bax62245z5a5ag8xdazfw4fg-nixfmt-1.2.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/pjy6lhz46m791bxjfzvvkr0cgm7mm0bg-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:53.381263Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/as7f2yrlqgv130vdiw2xi7rhlgd1yk8v-nixfmt-1.2.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/nyfwismzwk7b3hlkbcvssgikl4n4z3gx-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:27.681985Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/qmas80hmzqbm7n5h9is2im9gjzxsl04a-nixfmt-1.2.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nixfmt-rfc-style", + "broken": false, + "derivation": "/nix/store/vanb0cqaybyiq2315nk59c92mbksyf32-nixfmt-1.2.0.drv", + "description": "Official formatter for Nix code", + "install_id": "nixfmt", + "license": "MPL-2.0", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nixfmt-1.2.0", + "pname": "nixfmt-rfc-style", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:58.281533Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "1.2.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yx338k689yp9hpnl6h5y22f7vbmi5pky-nixfmt-1.2.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/ws40yy01bbw9sjd7y93byf8a15hv0m65-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:28:17.356063Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/fsrayxzszxaqcm5k849c33qncvr22rf1-nodejs-20.20.0-dev", + "libv8": "/nix/store/8dmg3m6pxx6g850dr572fbnkkb7l4qx9-nodejs-20.20.0-libv8", + "out": "/nix/store/l5zcv2mlpz4vkfr8gaznjl4l09pw7qva-nodejs-20.20.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/6wvfvavgqcd53gw4njxm1zc1cp3jg9ar-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:02:54.630769Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/6qd7afr0a8mw1y4lnddv380nb1yxg7mn-nodejs-20.20.0-dev", + "libv8": "/nix/store/9afma3lnsdzfscr8783lwcqydad477m5-nodejs-20.20.0-libv8", + "out": "/nix/store/8bcjyh3wm6172gch2hmjaw70786vnn0p-nodejs-20.20.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/m33808ahw4wxd0vz9brws07q39z0b76n-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:34:28.651760Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/q91w4zkkd52829lcx3c1m9k1b2clgv3r-nodejs-20.20.0-dev", + "libv8": "/nix/store/bl853ghmyam6zc9kpr8hq7dk8mdsnddi-nodejs-20.20.0-libv8", + "out": "/nix/store/nfpj0w7ckamxpbzci2y9zsrlsw1yjgsa-nodejs-20.20.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "nodejs_20", + "broken": false, + "derivation": "/nix/store/38nz5j3pxcj6lcgqypvi4pakf6gnqw2g-nodejs-20.20.0.drv", + "description": "Event-driven I/O framework for the V8 JavaScript engine", + "install_id": "node", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "nodejs-20.20.0", + "pname": "nodejs_20", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:20:59.682402Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "20.20.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "dev": "/nix/store/mha8cz3kq9pnnns2f4ygsdl911nnc9nn-nodejs-20.20.0-dev", + "libv8": "/nix/store/y8syar3i7lnw6ys8akhq252zznlfv0p7-nodejs-20.20.0-libv8", + "out": "/nix/store/jfar9wnj6kvr0gr6klh1gk7vgckkfr5j-nodejs-20.20.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/92637k27nqb44f4h7clw1kdqw8rar5hx-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:29:40.815428Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/dwz5z2wp95pkv6gsmz74w01qrihvhl1h-shfmt-3.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/g50gkqd9lwgpfwr7jcg582dw1nw614rv-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:04:32.072948Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/6gqqharpvjfzm1wzny6a0zgf1v0aj53a-shfmt-3.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/9piagmiq56gsz4fj4jfd465xg7lff27x-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:35:46.086711Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/98fwma9rxd04pxj9jrsgvf9xs76f9hlf-shfmt-3.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "shfmt", + "broken": false, + "derivation": "/nix/store/i58i9fgshxnqyjhin1zjqwg51cf5x6v1-shfmt-3.12.0.drv", + "description": "Shell parser and formatter", + "install_id": "shfmt", + "license": "BSD-3-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "shfmt-3.12.0", + "pname": "shfmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:22:48.977965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "3.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/c3bgrcwq2735ybl5zw68n9nqgwaa0yrj-shfmt-3.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mms0hjzhldcg5a5jl3x17y7i359c8776-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:06.303007Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/48r10kj61pjhz8alfscs8vgrdmlfnqx9-treefmt-2.4.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mjzjj0nz5h89bmfk38m24drghiw8ksbz-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:08.050718Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/d46fscf82k9ay6s8a3qxk3682ycqalds-treefmt-2.4.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/mwp0vfbz5937vcp9ngcj2caza8bjfzmj-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:09.420552Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/yllw5b2js10ia8v0z8x3crbakhal0cs7-treefmt-2.4.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "treefmt", + "broken": false, + "derivation": "/nix/store/6jm0r48c7bfs81mvwc1ydbgn5s978f0b-treefmt-2.4.0.drv", + "description": "One CLI to format the code tree", + "install_id": "treefmt", + "license": "MIT", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "treefmt-2.4.0", + "pname": "treefmt", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:23:26.245521Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "2.4.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/1pdwlp9d1rrm3xp4s5rhhk7mkmx9cmv2-treefmt-2.4.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/sy0jbfhah2dkmxf9ngd4j5wpymj61s8z-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T04:30:38.337965Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/2l7sbyyqardvrzr35zkrw67gbng5gb8y-yarn-berry-4.12.0" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/jzxis6qs5mb2lc9lx7xndv5vqmkx10x0-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:05:45.606272Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/klx9ndw1djgx0zhhyrkcn9an094rmmwv-yarn-berry-4.12.0" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/pjdps1mpblxfbmppb8b5wds8mzzjar2m-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T05:36:38.743524Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/m6cwiya6hrbwnlprh2cbnmz6c7mkylrf-yarn-berry-4.12.0" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "yarn-berry", + "broken": false, + "derivation": "/nix/store/v5xk5ivmrak80ppdcz4jpindj21xy6va-yarn-berry-4.12.0.drv", + "description": "Fast, reliable, and secure dependency management", + "install_id": "yarn", + "license": "BSD-2-Clause", + "locked_url": "https://github.com/flox/nixpkgs?rev=80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "name": "yarn-berry-4.12.0", + "pname": "yarn-berry", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev_count": 930839, + "rev_date": "2026-01-20T05:17:20Z", + "scrape_date": "2026-01-22T06:24:08.258012Z", + "stabilities": [ + "unstable" + ], + "unfree": false, + "version": "4.12.0", + "outputs_to_install": [ + "out" + ], + "outputs": { + "out": "/nix/store/q1gys3zgijcciiafbh9nfawkx5wj8179-yarn-berry-4.12.0" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ], + "compose": { + "composer": { + "version": 1, + "install": { + "node": { + "pkg-path": "nodejs_20" + }, + "yarn": { + "pkg-path": "yarn-berry", + "version": "4.12.0" + } + }, + "hook": { + "on-activate": " " + }, + "profile": {}, + "options": {}, + "include": { + "environments": [ + { + "dir": "../common" + } + ] + } + }, + "include": [ + { + "manifest": { + "version": 1, + "install": { + "nixfmt": { + "pkg-path": "nixfmt-rfc-style" + }, + "shfmt": { + "pkg-path": "shfmt" + }, + "treefmt": { + "pkg-path": "treefmt" + } + }, + "hook": { + "on-activate": " export ROOT_PROJECT=$(git rev-parse --show-toplevel)\n script() {\n local name=\"${1:-}\"\n shift || true\n if [ -z \"$name\" ]; then\n echo \"Usage: script [args...] (runs scripts/.sh)\" >&2\n return 1\n fi\n local project_root=\"${ROOT_PROJECT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}\"\n local path=\"$project_root/scripts/${name}.sh\"\n if [ ! -x \"$path\" ]; then\n echo \"script: $path not found or not executable\" >&2\n return 1\n fi\n \"$path\" \"$@\"\n }\n # Ensure Yarn 4 from the env wins over any host Yarn 1.x\n clean_path=\"$(printf '%s' \"$PATH\" | tr ':' '\\n' | grep -v '/.yarn/bin' | paste -sd: -)\"\n export COREPACK_HOME=\"$HOME/.local/share/corepack\"\n mkdir -p \"$HOME/.local/bin\" \"$COREPACK_HOME\"\n # Prefer the env-provided yarn binary explicitly if present.\n if command -v yarn >/dev/null 2>&1; then\n yarn_dir=\"$(dirname \"$(command -v yarn)\")\"\n export PATH=\"$yarn_dir:$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n else\n export PATH=\"$HOME/.local/bin:$COREPACK_HOME:$clean_path\"\n fi\n if command -v corepack >/dev/null 2>&1; then\n corepack enable --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n corepack prepare \"yarn@4.12.0\" --activate --install-directory \"$HOME/.local/bin\" >/dev/null 2>&1 || true\n hash -r\n fi\n " + }, + "profile": {}, + "options": {} + }, + "name": "common", + "descriptor": { + "dir": "../common" + } + } + ], + "warnings": [] + } +} \ No newline at end of file diff --git a/env/nodejs/.flox/env/manifest.toml b/env/nodejs/.flox/env/manifest.toml new file mode 100644 index 000000000..a8a021128 --- /dev/null +++ b/env/nodejs/.flox/env/manifest.toml @@ -0,0 +1,40 @@ +version = 1 + + +[install] +node.pkg-path = "nodejs_20" +yarn.pkg-path = "yarn-berry" +yarn.version = "4.12.0" + + +[vars] + +[hook] + on-activate = '' + + +[profile] + + +[services] +# myservice.command = "python3 -m http.server" + + +[include] +environments = [ + { dir = "../common" }, +] + + +[build] +# [build.myproject] +# description = "The coolest project ever" +# version = "0.0.1" +# command = """ +# mkdir -p $out/bin +# cargo build --release +# cp target/release/myproject $out/bin/myproject +# """ + + +[options] diff --git a/examples/E2E/.detoxrc.js b/examples/E2E/.detoxrc.js index 98759a8cb..3013348a6 100644 --- a/examples/E2E/.detoxrc.js +++ b/examples/E2E/.detoxrc.js @@ -1,3 +1,81 @@ +const { execSync } = require('child_process'); + +const defaultIOSDeviceCandidates = (() => { + const fromEnv = (process.env.IOS_DEVICE_NAMES || 'iPhone 14') + .split(',') + .map((name) => name.trim()) + .filter(Boolean); + return Array.from(new Set(['iPhone 17', ...fromEnv, 'iPhone 14'])); +})(); + +const safeParseJSON = (cmd) => { + try { + return JSON.parse( + execSync(cmd, { stdio: ['ignore', 'pipe', 'ignore'] }).toString() + ); + } catch (_) { + return null; + } +}; + +const listAvailableDevices = () => { + const parsed = safeParseJSON('xcrun simctl list devices -j'); + if (!parsed || !parsed.devices) return []; + const devices = []; + Object.values(parsed.devices).forEach((group) => { + (group || []).forEach((device) => { + if (device.isAvailable || device.availability === '(available)') { + devices.push(device); + } + }); + }); + return devices; +}; + +const listAvailableDeviceTypes = () => { + const parsed = safeParseJSON('xcrun simctl list devicetypes -j'); + if (!parsed || !parsed.devicetypes) return new Set(); + return new Set(parsed.devicetypes.map((dt) => dt.name.toLowerCase())); +}; + +const baseName = (name) => name.split(' (')[0].trim().toLowerCase(); + +const detectIOSDevice = () => { + if (process.env.DETOX_IOS_DEVICE) { + return { type: process.env.DETOX_IOS_DEVICE }; + } + + const devices = listAvailableDevices(); + const preferredDevice = defaultIOSDeviceCandidates.find((candidate) => + devices.some((d) => baseName(d.name) === candidate.toLowerCase()) + ); + if (preferredDevice) { + const found = devices.find( + (d) => baseName(d.name) === preferredDevice.toLowerCase() + ); + if (found) return { name: found.name }; + } + const anyIphoneDevice = devices.find((d) => + d.name.toLowerCase().includes('iphone') + ); + if (anyIphoneDevice) return { name: anyIphoneDevice.name }; + + const availableTypes = listAvailableDeviceTypes(); + const preferredType = defaultIOSDeviceCandidates.find((candidate) => + availableTypes.has(candidate.toLowerCase()) + ); + if (preferredType) return { type: preferredType }; + + const anyIphoneType = Array.from(availableTypes).find((t) => + t.includes('iphone') + ); + if (anyIphoneType) return { type: anyIphoneType }; + + return { type: defaultIOSDeviceCandidates[0] }; +}; + +const iosDevice = detectIOSDevice(); + /** @type {Detox.DetoxConfig} */ module.exports = { testRunner: { @@ -51,7 +129,8 @@ module.exports = { simulator: { type: 'ios.simulator', device: { - type: 'iPhone 14' + // Allow CI/local override; defaults to an available simulator by name (or type fallback). + ...iosDevice } }, attached: { @@ -63,7 +142,12 @@ module.exports = { emulator: { type: 'android.emulator', device: { - avdName: process.env.CI ? 'Pixel_API_21_AOSP': 'Pixel_3a_API_32' + // Default to latest AVD name (arch-aware); override via DETOX_AVD. For minsdk testing, set DETOX_AVD to an API 21 AVD. + avdName: (() => { + if (process.env.DETOX_AVD) return process.env.DETOX_AVD; + const arch = require('os').arch(); + return arch === 'arm64' ? 'medium_phone_API33_arm64_v8a' : 'medium_phone_API33_x86_64'; + })() } } }, diff --git a/examples/E2E/android/app/build.gradle b/examples/E2E/android/app/build.gradle index bc8fe887d..bb3d99bc2 100644 --- a/examples/E2E/android/app/build.gradle +++ b/examples/E2E/android/app/build.gradle @@ -72,6 +72,7 @@ android { ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion namespace "com.AnalyticsReactNativeE2E" defaultConfig { @@ -112,12 +113,6 @@ dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.squareup.okhttp3', module:'okhttp' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") } else { diff --git a/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.java b/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.java index cd5b079b6..b7ee722d5 100644 --- a/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.java +++ b/examples/E2E/android/app/src/main/java/com/analyticsreactnativeexample/MainApplication.java @@ -57,6 +57,5 @@ public void onCreate() { // If you opted-in for the New Architecture, we load the native entry point for this app. DefaultNewArchitectureEntryPoint.load(); } - ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } } diff --git a/examples/E2E/android/build.gradle b/examples/E2E/android/build.gradle index 9c2d29f43..76dad852a 100644 --- a/examples/E2E/android/build.gradle +++ b/examples/E2E/android/build.gradle @@ -1,8 +1,16 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +// Ensure Gradle sees the SDK path from the environment (set by flox activation). +def envSdk = System.getenv("ANDROID_SDK_ROOT") ?: System.getenv("ANDROID_HOME") +if (envSdk) { + System.setProperty("android.home", envSdk) + System.setProperty("android.sdkRoot", envSdk) +} + buildscript { ext { - buildToolsVersion = "33.0.0" + // Resolve build-tools from env override, then from the SDK on disk, falling back to a sane default. + buildToolsVersion = System.getenv("ANDROID_BUILD_TOOLS_VERSION") ?: "30.0.3" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 @@ -34,4 +42,4 @@ allprojects { jcenter() maven { url 'https://www.jitpack.io' } } -} \ No newline at end of file +} diff --git a/examples/E2E/android/gradle.properties b/examples/E2E/android/gradle.properties index a3b2fa124..fffa00c6d 100644 --- a/examples/E2E/android/gradle.properties +++ b/examples/E2E/android/gradle.properties @@ -24,14 +24,14 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -# Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.182.0 - # Use this property to specify which architecture you want to build. # You can also override it from the CLI using # ./gradlew -PreactNativeArchitectures=x86_64 reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 +# Force build-tools to the flox-pinned version to avoid downloads into the read-only SDK. +android.buildToolsVersion=30.0.3 + # Use this property to enable support to the new architecture. # This will allow you to use TurboModules and the Fabric render in # your application. You should enable this flag either if you want diff --git a/examples/E2E/ios/Podfile b/examples/E2E/ios/Podfile index 0e91586a8..e8c21a1c7 100644 --- a/examples/E2E/ios/Podfile +++ b/examples/E2E/ios/Podfile @@ -8,17 +8,6 @@ require Pod::Executable.execute_command('node', ['-p', platform :ios, min_ios_version_supported prepare_react_native_project! -# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. -# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded -# -# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` -# ```js -# module.exports = { -# dependencies: { -# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), -# ``` -flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled - linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green @@ -36,11 +25,6 @@ target 'AnalyticsReactNativeE2E' do # Hermes is now enabled by default. Disable by setting this flag to false. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable the next line. - :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) @@ -51,6 +35,11 @@ target 'AnalyticsReactNativeE2E' do end post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4' + end + end # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, diff --git a/examples/E2E/ios/Podfile.lock b/examples/E2E/ios/Podfile.lock index 3b2b01152..0039daf46 100644 --- a/examples/E2E/ios/Podfile.lock +++ b/examples/E2E/ios/Podfile.lock @@ -1,6 +1,5 @@ PODS: - boost (1.76.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.72.9) - FBReactNativeSpec (0.72.9): @@ -10,71 +9,12 @@ PODS: - React-Core (= 0.72.9) - React-jsi (= 0.72.9) - ReactCommon/turbomodule/core (= 0.72.9) - - Flipper (0.182.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.182.0): - - FlipperKit/Core (= 0.182.0) - - FlipperKit/Core (0.182.0): - - Flipper (~> 0.182.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.182.0): - - Flipper (~> 0.182.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.182.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.182.0) - - FlipperKit/FKPortForwarding (0.182.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.182.0) - - FlipperKit/FlipperKitLayoutHelpers (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0) - - FlipperKit/FlipperKitNetworkPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.182.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.72.9): - hermes-engine/Pre-built (= 0.72.9) - hermes-engine/Pre-built (0.72.9) - libevent (2.1.12) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -499,45 +439,22 @@ PODS: - RNScreens (3.27.0): - RCT-Folly (= 2021.07.22.00) - React-Core - - segment-analytics-react-native (2.20.2): + - segment-analytics-react-native (2.21.4): - React-Core - sovran-react-native - SocketRocket (0.6.1) - - sovran-react-native (1.1.2): + - sovran-react-native (1.1.3): - React-Core - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.182.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.182.0) - - FlipperKit/Core (= 0.182.0) - - FlipperKit/CppBridge (= 0.182.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0) - - FlipperKit/FBDefines (= 0.182.0) - - FlipperKit/FKPortForwarding (= 0.182.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.182.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.182.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.182.0) - - FlipperKit/FlipperKitReactPlugin (= 0.182.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.182.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) @@ -545,7 +462,6 @@ DEPENDENCIES: - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -584,20 +500,9 @@ DEPENDENCIES: SPEC REPOS: trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - fmt - libevent - - OpenSSL-Universal - SocketRocket - - YogaKit EXTERNAL SOURCES: boost: @@ -697,23 +602,13 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 7dcd2de282d72e344012f7d6564d024930a6a440 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: dc178b8748748c036ef9493a5d59d6d1f91a36ce FBReactNativeSpec: d0aaae78e93c89dc2d691d8052a4d2aeb1b461ee - Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 9b9bb14184a11b8ceb4131b09abf634880f0f46d libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: f30c3213569b1dc43659ecc549a6536e1e11139e RCTTypeSafety: e1ed3137728804fa98bce30b70e3da0b8e23054e @@ -752,12 +647,11 @@ SPEC CHECKSUMS: RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741 RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581 - segment-analytics-react-native: 53785e35d44a0643beffa40eada68a4cbdf7292e + segment-analytics-react-native: 05c3bf2adb8a3be2c273808a6fdaced06d927917 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - sovran-react-native: 5f02bd2d111ffe226d00c7b0435290eae6f10934 + sovran-react-native: eec37f82e4429f0e3661f46aaf4fcd85d1b54f60 Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6 - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 9d352ca8db1e31a063d2585ed47fdadabf87fe90 +PODFILE CHECKSUM: a4c187e503408b85ffe8c89a4cb726ec541057ce -COCOAPODS: 1.11.3 +COCOAPODS: 1.16.2 diff --git a/examples/E2E/package.json b/examples/E2E/package.json index 77c4ba81f..669ae082e 100644 --- a/examples/E2E/package.json +++ b/examples/E2E/package.json @@ -9,9 +9,9 @@ "lint": "eslint .", "start": "react-native start", "build:android": "yarn detox build --configuration android.emu.release", - "test:android": "yarn detox test --configuration android.emu.release", + "test:android": "yarn detox test --configuration android.emu.release --reuse", "build:ios": "yarn detox build --configuration ios.sim.release", - "test:ios": "yarn detox test --configuration ios.sim.release", + "test:ios": "yarn detox test --configuration ios.sim.release --reuse", "start:e2e": "yarn start", "android:deeplink": "adb shell am start -a android.intent.action.VIEW -d \"segmentreactnative://hello\" com.example.segmentanalyticsreactnative", "ios:deeplink": "xcrun simctl openurl booted segmentreactnative://hello", diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 000000000..a468eda9e --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +org.gradle.java.home=/nix/store/hlm8a8cnp4hm8xkg0a2yy4kv7cq44jii-zulu-ca-jdk-17.0.12 diff --git a/multi-release.config.js b/multi-release.config.js index 4a5fc7895..d7dccc284 100644 --- a/multi-release.config.js +++ b/multi-release.config.js @@ -1,7 +1,11 @@ module.exports = { - tagFormat: "${name}-v${version}", + branches: ['master', { name: 'beta', prerelease: true }], + tagFormat: '${name}-v${version}', deps: { bump: 'satisfy', // Do not trigger a release for every package if the only change is a minor/patch upgrade of dependencies - prefix: '^' // by default all semvers will get set to ^major version - } -} \ No newline at end of file + prefix: '^', // by default all semvers will get set to ^major version + }, + ignorePrivate: true, + sequentialInit: true, + sequentialPrepare: true, +}; diff --git a/package.json b/package.json index 5836c4baf..f11e8a682 100644 --- a/package.json +++ b/package.json @@ -8,19 +8,43 @@ "packages/plugins/*" ], "scripts": { - "bootstrap": "yarn install && yarn example install && yarn example pods && yarn e2e install && yarn e2e pods && husky install", - "bootstrap:ci": "yarn install && yarn e2e install && yarn e2e pods && husky install", "core": "yarn workspace @segment/analytics-react-native", "sovran": "yarn workspace @segment/sovran-react-native", "example": "yarn --cwd examples/AnalyticsReactNativeExample", "e2e": "yarn --cwd examples/E2E", - "build": "yarn workspaces foreach -A --topological-dev run build", + "build": "bash scripts/build.sh libs", + "build:full": "bash scripts/build.sh full", "testAll": "yarn workspaces foreach -A -p run test --passWithNoTests", - "clean": "yarn workspaces foreach -A -p run clean", + "clean": "bash scripts/clean.sh all", "typescript": "tsc --noEmit --composite false", "test": "jest", "lint": "eslint .", - "release": " yarn multi-semantic-release" + "lint:fix": "eslint . --fix", + "format": "treefmt --clear-cache", + "format:check": "treefmt --clear-cache --fail-on-change", + "update:yarn": "bash scripts/update.sh yarn", + "update:gradle": "bash scripts/update.sh gradle", + "update:pods": "bash scripts/update.sh pods", + "update:nix": "bash scripts/update.sh nix", + "update:flox": "bash scripts/update.sh flox", + "update:all": "bash scripts/update.sh all", + "test:fast": "yarn lint && yarn typescript && yarn test", + "test:full": "yarn lint && yarn typescript && yarn build && yarn testAll", + "clean:workspaces": "bash scripts/clean.sh workspaces", + "clean:gradle": "bash scripts/clean.sh gradle", + "clean:cocoapods": "bash scripts/clean.sh pods", + "clean:android": "bash scripts/clean.sh android", + "clean:ios": "bash scripts/clean.sh ios", + "clean:emulators": "bash scripts/clean.sh emulators", + "clean:nix": "bash scripts/clean.sh nix", + "clean:flox": "bash scripts/clean.sh flox", + "devices:start": "bash scripts/devices.sh start latest", + "devices:start:min": "bash scripts/devices.sh start min", + "devices:start:all": "bash scripts/devices.sh start all", + "devices:stop": "bash scripts/devices.sh stop all", + "release": "yarn multi-semantic-release", + "e2e:android": "yarn e2e install && yarn build && yarn e2e build:android && yarn e2e test:android", + "e2e:ios": "yarn e2e install && yarn e2e pods && yarn build && yarn e2e build:ios && yarn e2e test:ios" }, "devDependencies": { "@anolilab/multi-semantic-release": "^1.0.3", @@ -59,5 +83,5 @@ "ts-jest": "^29.1.1", "typescript": "^5.2.2" }, - "packageManager": "yarn@4.1.0" + "packageManager": "yarn@4.12.0" } diff --git a/packages/core/android/build.gradle b/packages/core/android/build.gradle index 4b81adea5..bbee69a4c 100644 --- a/packages/core/android/build.gradle +++ b/packages/core/android/build.gradle @@ -54,6 +54,7 @@ android { } compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") + buildToolsVersion getExtOrDefault("buildToolsVersion") defaultConfig { minSdkVersion getExtOrIntegerDefault("minSdkVersion") @@ -93,4 +94,3 @@ dependencies { // Requires sovran for communication implementation project(path: ':segment_sovran-react-native') } - diff --git a/packages/plugins/plugin-advertising-id/android/build.gradle b/packages/plugins/plugin-advertising-id/android/build.gradle index 705a6f6f0..bd028de22 100644 --- a/packages/plugins/plugin-advertising-id/android/build.gradle +++ b/packages/plugins/plugin-advertising-id/android/build.gradle @@ -54,6 +54,7 @@ android { } compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") + buildToolsVersion getExtOrDefault("buildToolsVersion") defaultConfig { minSdkVersion getExtOrIntegerDefault("minSdkVersion") @@ -93,4 +94,3 @@ dependencies { // Required for AdvertisingID implementation "com.google.android.gms:play-services-ads-identifier:18.0.1" } - diff --git a/packages/sovran/android/build.gradle b/packages/sovran/android/build.gradle index 7a3291007..2e8a3ef30 100644 --- a/packages/sovran/android/build.gradle +++ b/packages/sovran/android/build.gradle @@ -54,6 +54,7 @@ android { } compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") + buildToolsVersion getExtOrDefault("buildToolsVersion") defaultConfig { minSdkVersion getExtOrIntegerDefault("minSdkVersion") @@ -91,4 +92,3 @@ dependencies { implementation "com.facebook.react:react-native:+" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } - diff --git a/release.config.js b/release.config.js index 657d2e34b..cfef80cd1 100644 --- a/release.config.js +++ b/release.config.js @@ -1,13 +1,18 @@ +const changelogFile = 'CHANGELOG.md'; + module.exports = { + branches: [ + 'master', + { name: 'beta', prerelease: true }, + ], + tagFormat: '${name}-v${version}', plugins: [ - [ - '@semantic-release/commit-analyzer', - { preset: 'conventionalcommits' } - ], - '@semantic-release/changelog', - 'semantic-release-yarn', - '@semantic-release/github', - '@semantic-release/git' + ['@semantic-release/commit-analyzer', { preset: 'conventionalcommits' }], + ['@semantic-release/release-notes-generator', { preset: 'conventionalcommits' }], + ['@semantic-release/changelog', { changelogFile }], + ['@semantic-release/npm', { npmPublish: true }], + ['@semantic-release/github', { successComment: false }], + ['@semantic-release/git', { assets: [changelogFile, 'package.json'] }], ], - debug: true + debug: true, }; diff --git a/scripts/android.sh b/scripts/android.sh new file mode 100755 index 000000000..51ee96f29 --- /dev/null +++ b/scripts/android.sh @@ -0,0 +1,259 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Helper to set ANDROID_SDK_ROOT/ANDROID_HOME/PATH from the flake if not already set. +setup_android_env() { + if [ -z "${ANDROID_SDK_ROOT:-}" ] && [ -z "${ANDROID_HOME:-}" ]; then + project_root="${PROJECT_ROOT:-${PWD}}" + sdk_out=$( + nix --extra-experimental-features 'nix-command flakes' \ + eval --raw "path:${project_root}/env/android/latest#android-sdk-latest.outPath" 2>/dev/null || \ + nix --extra-experimental-features 'nix-command flakes' \ + eval --raw "path:${project_root}/env/android/min#android-sdk-min.outPath" 2>/dev/null || true + ) + if [ -n "${sdk_out:-}" ] && [ -d "$sdk_out/libexec/android-sdk" ]; then + ANDROID_SDK_ROOT="$sdk_out/libexec/android-sdk" + ANDROID_HOME="$ANDROID_SDK_ROOT" + fi + fi + + if [ -z "${ANDROID_SDK_ROOT:-}" ] && [ -n "${ANDROID_HOME:-}" ]; then + ANDROID_SDK_ROOT="$ANDROID_HOME" + fi + + if [ -n "${ANDROID_SDK_ROOT:-}" ] && [ -z "${ANDROID_HOME:-}" ]; then + ANDROID_HOME="$ANDROID_SDK_ROOT" + fi + + export ANDROID_SDK_ROOT ANDROID_HOME + + if [ -n "${ANDROID_SDK_ROOT:-}" ]; then + cmdline_tools_bin="" + if [ -d "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" ]; then + cmdline_tools_bin="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" + else + cmdline_tools_dir=$(find "$ANDROID_SDK_ROOT/cmdline-tools" -maxdepth 1 -mindepth 1 -type d -not -name latest 2>/dev/null | sort -V | tail -n 1) + if [ -n "${cmdline_tools_dir:-}" ] && [ -d "$cmdline_tools_dir/bin" ]; then + cmdline_tools_bin="$cmdline_tools_dir/bin" + fi + fi + + new_path="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/platform-tools" + + if [ -n "${cmdline_tools_bin:-}" ]; then + new_path="$new_path:$cmdline_tools_bin" + fi + + new_path="$new_path:$ANDROID_SDK_ROOT/tools/bin:$PATH" + PATH="$new_path" + export PATH + fi +} + +require_tool() { + if ! command -v "$1" >/dev/null 2>&1; then + echo "Missing required tool: $1. Ensure the Android SDK is available in PATH." >&2 + exit 1 + fi +} + +detect_sdk_root() { + if [[ -n "${ANDROID_SDK_ROOT:-}" ]]; then + echo "$ANDROID_SDK_ROOT" + return + fi + + local sm + sm="$(command -v sdkmanager 2>/dev/null || true)" + if [[ -z "$sm" ]]; then + return + fi + if command -v greadlink >/dev/null 2>&1; then + sm="$(greadlink -f "$sm")" + else + sm="$(cd "$(dirname "$sm")" && pwd)/$(basename "$sm")" + fi + local candidates=( + "$(dirname "$sm")/.." + "$(dirname "$sm")/../share/android-sdk" + "$(dirname "$sm")/../libexec/android-sdk" + "$(dirname "$sm")/../.." + ) + for c in "${candidates[@]}"; do + if [[ -d "$c/platform-tools" || -d "$c/platforms" || -d "$c/system-images" ]]; then + echo "$c" + return + fi + done +} + +avd_exists() { + local name="$1" + avdmanager list avd | grep -q "Name: ${name}" +} + +pick_image() { + local api="$1" tag="$2" preferred_abi="$3" + local host_arch + host_arch="$(uname -m)" + + local candidates=() + if [[ -n "${preferred_abi:-}" ]]; then + candidates=("$preferred_abi") + else + case "$host_arch" in + arm64|aarch64) candidates=("arm64-v8a" "x86_64" "x86") ;; + *) candidates=("x86_64" "x86" "arm64-v8a") ;; + esac + fi + + for abi in "${candidates[@]}"; do + local image="system-images;android-${api};${tag};${abi}" + local path="${ANDROID_SDK_ROOT}/system-images/android-${api}/${tag}/${abi}" + if [[ -d "$path" ]]; then + echo "$image" + return 0 + fi + done + + return 1 +} + +create_avd() { + local name="$1" device="$2" image="$3" + local abi="${image##*;}" + + if avd_exists "$name"; then + echo "AVD ${name} already exists." + return 0 + fi + + echo "Creating AVD ${name} with ${image}..." + yes "" | avdmanager create avd --force --name "$name" --package "$image" --device "$device" --abi "$abi" --sdcard 512M +} + +ensure_avd() { + local name="$1" api="$2" device="$3" tag="$4" preferred_abi="$5" + + if avd_exists "$name"; then + return 0 + fi + + local api_image + if ! api_image="$(pick_image "$api" "$tag" "$preferred_abi")"; then + echo "Expected API ${api} system image (${tag}; preferred ABI ${preferred_abi:-auto}) not found under ${ANDROID_SDK_ROOT}/system-images/android-${api}." >&2 + return 1 + fi + + create_avd "$name" "$device" "$api_image" +} + +setup_android_env + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + # Only environment setup when sourced. + return 0 +fi + +action="${1:-}"; shift || true + +start_android() { + local flavor="${AVD_FLAVOR:-minsdk}" headless="${EMU_HEADLESS:-}" port="${EMU_PORT:-5554}" + local avd="${DETOX_AVD:-}" + local host_arch + host_arch="$(uname -m)" + + require_tool avdmanager + require_tool emulator + + if [[ -z "$avd" ]]; then + if [[ "$host_arch" == "arm64" || "$host_arch" == "aarch64" ]]; then + avd="medium_phone_API33_arm64_v8a" + else + avd="medium_phone_API33_x86_64" + fi + fi + + local api_hint="" device_hint="" abi_hint="" + if [[ "$avd" =~ _API([0-9]+)_ ]]; then + api_hint="${BASH_REMATCH[1]}" + fi + if [[ "$avd" == medium_phone_* ]]; then + device_hint="medium_phone" + elif [[ "$avd" == pixel_* ]]; then + device_hint="pixel" + fi + if [[ "$avd" =~ _API[0-9]+_(.+)$ ]]; then + case "${BASH_REMATCH[1]}" in + arm64_v8a) abi_hint="arm64-v8a" ;; + armeabi_v7a) abi_hint="armeabi-v7a" ;; + *) abi_hint="${BASH_REMATCH[1]}" ;; + esac + fi + + local target_serial="emulator-${port}" + + if ! avd_exists "${avd}"; then + local env_args=( + "$avd" + "${api_hint:-33}" + "${device_hint:-medium_phone}" + "google_apis" + "${abi_hint:-}" + ) + if [[ -z "$abi_hint" && ( "$host_arch" == "arm64" || "$host_arch" == "aarch64" ) ]]; then + env_args[4]="arm64-v8a" + fi + ensure_avd "${env_args[@]}" || true + fi + + if ! avd_exists "${avd}"; then + if avd_exists "medium_phone_API33_arm64_v8a"; then + avd="medium_phone_API33_arm64_v8a" + elif avd_exists "medium_phone_API33_x86_64"; then + avd="medium_phone_API33_x86_64" + else + avd="$(avdmanager list avd | awk -F': ' '/Name:/ {print $2}' | head -n1)" + fi + fi + + if command -v adb >/dev/null 2>&1; then + adb devices | awk 'NR>1 && $2=="offline" {print $1}' | while read -r d; do adb -s "$d" emu kill >/dev/null 2>&1 || true; done + fi + echo "Starting Android emulator: ${avd} (flavor ${flavor}, port ${port}, headless=${headless:-0})" + emulator -avd "${avd}" ${headless:+-no-window} -port "${port}" -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -accel on -writable-system -no-snapshot-save & + local emu_pid=$! + adb -s "${target_serial}" wait-for-device + local boot_completed="" + until [ "$boot_completed" = "1" ]; do + boot_completed=$(adb -s "${target_serial}" shell getprop sys.boot_completed 2>/dev/null | tr -d "\r") + sleep 5 + done + adb -s "${target_serial}" shell settings put global window_animation_scale 0 + adb -s "${target_serial}" shell settings put global transition_animation_scale 0 + adb -s "${target_serial}" shell settings put global animator_duration_scale 0 + + if [[ "${EMU_FOREGROUND:-}" == "1" || "${EMU_FOREGROUND:-}" == "true" ]]; then + wait "$emu_pid" + fi +} + +stop_android() { + if command -v adb >/dev/null 2>&1; then + adb devices -l 2>/dev/null | tail -n +2 | awk '{print $1}' | while read -r d; do adb -s "$d" emu kill >/dev/null 2>&1 || true; done + fi + pkill -f "emulator@" >/dev/null 2>&1 || true +} + +reset_android() { + rm -rf "${ANDROID_AVD_HOME:-$HOME/.android/avd}" + rm -f "$HOME/.android/adbkey" "$HOME/.android/adbkey.pub" + echo "AVDs and adb keys removed. Recreate via start." +} + +case "$action" in + start) start_android ;; + stop) stop_android ;; + reset) reset_android ;; + *) echo "Usage: android.sh {start|stop|reset}" >&2; exit 1 ;; +esac diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 000000000..5816d5074 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +set -euo pipefail + +target="${1:-libs}" + +project_root="${PROJECT_ROOT:-${DEVBOX_PROJECT_ROOT:-}}" +if [ -z "$project_root" ]; then + project_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" +fi +cd "$project_root" + +yarn install --immutable + +build_libs() { + local since_flags=() + if [[ -n "${BUILD_SINCE_REF:-}" ]]; then + since_flags=(--since "${BUILD_SINCE_REF}") + fi + if [[ ${#since_flags[@]} -gt 0 ]]; then + yarn workspaces foreach -A --topological-dev -p "${since_flags[@]}" run build + else + yarn workspaces foreach -A --topological-dev -p run build + fi +} + +case "$target" in + libs|workspaces|default) build_libs ;; + fast) build_libs ;; + full) + build_libs + yarn lint + yarn test --coverage + ;; + *) + echo "Unknown build target: $target" + echo "Valid targets: libs (default), fast, full" + exit 1 + ;; +esac + +echo "Build ($target) complete." diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100755 index 000000000..26d417417 --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +set -euo pipefail + +target="${1:-all}" + +project_root="${PROJECT_ROOT:-${DEVBOX_PROJECT_ROOT:-}}" +if [ -z "$project_root" ]; then + project_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" +fi +cd "$project_root" + +clean_workspaces() { + yarn workspaces foreach -A -p run clean || true +} + +clean_gradle() { + rm -rf ~/.gradle/caches ~/.gradle/wrapper + rm -rf examples/E2E/android/build examples/E2E/android/app/build +} + +clean_pods() { + rm -rf examples/E2E/ios/Podfile.lock examples/E2E/ios/Pods +} + +stop_android_emulators() { + if command -v flox >/dev/null 2>&1; then + flox services stop android-emulator-min android-emulator-latest >/dev/null 2>&1 || true + fi + if command -v adb >/dev/null 2>&1; then + devices=$(adb devices -l 2>/dev/null | tail -n +2 | awk '{print $1}') + if [ -n "${devices:-}" ]; then + for d in $devices; do adb -s "$d" emu kill >/dev/null 2>&1 || true; done + fi + fi + pkill -f "emulator@" >/dev/null 2>&1 || true +} + +stop_ios_simulators() { + if command -v flox >/dev/null 2>&1; then + flox services stop ios-simulator-min ios-simulator-latest >/dev/null 2>&1 || true + fi + if command -v xcrun >/dev/null 2>&1 && xcrun -f simctl >/dev/null 2>&1; then + xcrun simctl shutdown all >/dev/null 2>&1 || true + xcrun simctl erase all >/dev/null 2>&1 || true + fi +} + +clean_android() { + stop_android_emulators + rm -rf ~/.android/avd ~/.android/adbkey* + clean_gradle +} + +clean_ios() { + stop_ios_simulators + rm -rf ~/Library/Developer/CoreSimulator/Devices + rm -rf ~/Library/Developer/Xcode/DerivedData + clean_pods +} + +clean_nix() { + nix-collect-garbage -d >/dev/null 2>&1 || true +} + +clean_flox() { + flox gc >/dev/null 2>&1 || true +} + +clean_emulators() { + stop_android_emulators + stop_ios_simulators +} + +case "$target" in + workspaces) clean_workspaces ;; + gradle) clean_gradle ;; + pods|cocoapods) clean_pods ;; + android) clean_android ;; + ios) clean_ios ;; + nix|nix-gc) clean_nix ;; + flox) clean_flox ;; + emulators) clean_emulators ;; + all) + clean_workspaces + clean_gradle + clean_pods + clean_emulators + clean_android + clean_ios + clean_nix + clean_flox + ;; + *) + echo "Unknown clean target: $target" + echo "Valid targets: all, workspaces, gradle, pods, android, ios, emulators, nix, flox" + exit 1 + ;; +esac + +echo "Clean ($target) complete." diff --git a/scripts/devices.sh b/scripts/devices.sh new file mode 100755 index 000000000..19ce0765d --- /dev/null +++ b/scripts/devices.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +set -euo pipefail + +action="${1:-start}" +target="${2:-all}" + +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +project_root="${PROJECT_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}" +cd "$project_root" + +start_android() { bash "${script_dir}/android.sh" start; } +stop_android() { bash "${script_dir}/android.sh" stop; } +reset_android() { bash "${script_dir}/android.sh" reset; } + +start_ios() { bash "${script_dir}/ios.sh" start; } +stop_ios() { bash "${script_dir}/ios.sh" stop; } +reset_ios() { bash "${script_dir}/ios.sh" reset; } + +case "$action:$target" in + start:android) start_android ;; + start:ios) start_ios ;; + start:all) start_android; start_ios ;; + stop:android) stop_android ;; + stop:ios) stop_ios ;; + stop:all) stop_android; stop_ios ;; + reset:android) reset_android ;; + reset:ios) reset_ios ;; + reset:all) reset_android; reset_ios ;; + *) + cat >&2 <<'EOF' +Usage: bash scripts/devices.sh [start|stop|reset] [all|android|ios] +Starts/stops the local Android emulator and iOS simulator using the helper scripts. +EOF + exit 1 + ;; +esac + +echo "$action ($target) complete." diff --git a/scripts/ios.sh b/scripts/ios.sh new file mode 100755 index 000000000..a3f9370d5 --- /dev/null +++ b/scripts/ios.sh @@ -0,0 +1,266 @@ +#!/usr/bin/env bash +set -euo pipefail + +init_ios_env() { + if [[ -z "${PROJECT_ROOT:-}" ]] && command -v git >/dev/null 2>&1; then + PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" + export PROJECT_ROOT + fi + + if [[ -z "${DETOX_IOS_DEVICE:-}" ]]; then + DETOX_IOS_DEVICE="${IOS_SIM_DEVICE:-${IOS_SIM_LATEST_DEVICE:-iPhone 17}}" + export DETOX_IOS_DEVICE + fi +} + +init_ios_env + +require_tool() { + if ! command -v "$1" >/dev/null 2>&1; then + echo "Missing required tool: $1. Install Xcode CLI tools before running (xcode-select --install or Xcode.app + xcode-select -s)." >&2 + exit 1 + fi +} + +ensure_developer_dir() { + local desired="${IOS_DEVELOPER_DIR:-}" + if [[ -z "$desired" ]]; then + if xcode-select -p >/dev/null 2>&1; then + desired="$(xcode-select -p)" + elif [[ -d /Applications/Xcode.app/Contents/Developer ]]; then + desired="/Applications/Xcode.app/Contents/Developer" + fi + fi + + if [[ -n "$desired" && -d "$desired" ]]; then + export DEVELOPER_DIR="$desired" + export PATH="$DEVELOPER_DIR/usr/bin:$PATH" + return 0 + fi + + echo "Xcode developer directory not found. Install Xcode/CLI tools or set IOS_DEVELOPER_DIR to an Xcode path (e.g., /Applications/Xcode.app/Contents/Developer)." >&2 + exit 1 +} + +ensure_simctl() { + if xcrun -f simctl >/dev/null 2>&1; then + return 0 + fi + cat >&2 <<'EOF' +Missing simctl. +- The standalone Command Line Tools do NOT include simctl; you need full Xcode. +- Install/locate Xcode.app, then select it: + sudo xcode-select -s /Applications/Xcode.app/Contents/Developer +- You can also set IOS_DEVELOPER_DIR to your Xcode path for this script. +EOF + exit 1 +} + +ensure_core_sim_service() { + local output status + output="$(xcrun simctl list devices -j 2>&1)" || status=$? + if [[ -n "${status:-}" ]]; then + echo "simctl failed while listing devices (status ${status}). CoreSimulatorService may be unhealthy." >&2 + echo "Try restarting it:" >&2 + echo " killall -9 com.apple.CoreSimulatorService 2>/dev/null || true" >&2 + echo " launchctl kickstart -k gui/$UID/com.apple.CoreSimulatorService" >&2 + echo "Then open Simulator once and rerun setup." >&2 + echo "simctl error output:" >&2 + echo "$output" >&2 + return 1 + fi + + if echo "$output" | grep -q "CoreSimulatorService connection became invalid"; then + echo "CoreSimulatorService is not healthy. Try restarting it:" >&2 + echo " killall -9 com.apple.CoreSimulatorService 2>/dev/null || true" >&2 + echo " launchctl kickstart -k gui/$UID/com.apple.CoreSimulatorService" >&2 + echo "Then open Simulator once and rerun setup." >&2 + echo "simctl error output:" >&2 + echo "$output" >&2 + return 1 + fi +} + +latest_runtime() { + local json + json="$(xcrun simctl list runtimes -j)" + echo "$json" | jq -r '.runtimes[] | select(.isAvailable and (.name|startswith("iOS "))) | "\(.version)|\(.identifier)|\(.name)"' \ + | sort -Vr | head -n1 | cut -d"|" -f2- +} + +resolve_runtime() { + local preferred="${1:-}" + local json choice + json="$(xcrun simctl list runtimes -j)" + + if [[ -n "$preferred" ]]; then + # Normalize inputs like "iOS 26.2" or a full runtime identifier. + if [[ "$preferred" =~ ^iOS[[:space:]]+ ]]; then + preferred="${preferred#iOS }" + preferred="${preferred# }" + fi + if [[ "$preferred" =~ ^com\.apple\.CoreSimulator\.SimRuntime\.iOS- ]]; then + choice="$(echo "$json" | jq -r --arg v "$preferred" '.runtimes[] | select(.isAvailable and .identifier == $v) | "\(.identifier)|\(.name)"' | head -n1)" + if [[ -n "$choice" && "$choice" != "null" ]]; then + echo "$choice" + return 0 + fi + echo "Preferred runtime identifier ${preferred} not found. Install it in Xcode (Settings > Platforms) or update IOS_RUNTIME." >&2 + return 1 + fi + + choice="$(echo "$json" | jq -r --arg v "$preferred" '.runtimes[] | select(.isAvailable and (.name|startswith("iOS \($v)"))) | "\(.identifier)|\(.name)"' | head -n1)" + if [[ -n "$choice" && "$choice" != "null" ]]; then + echo "$choice" + return 0 + fi + + if [[ "${IOS_DOWNLOAD_RUNTIME:-0}" != "0" ]] && command -v xcodebuild >/dev/null 2>&1; then + echo "Preferred runtime iOS ${preferred} not found. Attempting to download via xcodebuild -downloadPlatform iOS..." >&2 + if xcodebuild -downloadPlatform iOS; then + json="$(xcrun simctl list runtimes -j)" + choice="$(echo "$json" | jq -r --arg v "$preferred" '.runtimes[] | select(.isAvailable and (.name|startswith("iOS \($v)"))) | "\(.identifier)|\(.name)"' | head -n1)" + if [[ -n "$choice" && "$choice" != "null" ]]; then + echo "$choice" + return 0 + fi + else + echo "xcodebuild -downloadPlatform iOS failed." >&2 + fi + fi + + echo "Preferred runtime iOS ${preferred} not found. Install the platform in Xcode (Settings > Platforms) or update IOS_RUNTIME." >&2 + return 1 + fi + + choice="$(latest_runtime)" + if [[ -z "$choice" || "$choice" == "null" ]]; then + echo "No available iOS simulator runtime found. Install one in Xcode (Settings > Platforms) and retry." >&2 + return 1 + fi + + echo "$choice" +} + +existing_device_udid_any_runtime() { + local name="$1" + xcrun simctl list devices -j | jq -r --arg name "$name" '.devices[]?[]? | select(.name == $name) | .udid' | head -n1 +} + +device_data_dir_exists() { + local udid="${1:-}" + [[ -n "$udid" ]] || return 1 + local dir="$HOME/Library/Developer/CoreSimulator/Devices/$udid" + [[ -d "$dir" ]] +} + +devicetype_id_for_name() { + local name="$1" + xcrun simctl list devicetypes -j | jq -r --arg name "$name" '.devicetypes[] | select((.name|ascii_downcase) == ($name|ascii_downcase)) | .identifier' | head -n1 +} + +ensure_device() { + local base_name="$1" preferred_runtime="$2" + + if existing_udid=$(existing_device_udid_any_runtime "$base_name"); [[ -n "${existing_udid}" ]]; then + if device_data_dir_exists "$existing_udid"; then + echo "Found existing ${base_name}: ${existing_udid}" + return 0 + fi + echo "Existing ${base_name} (${existing_udid}) is missing its data directory. Deleting stale simulator..." + xcrun simctl delete "$existing_udid" || true + fi + + local choice runtime_id runtime_name + if ! choice=$(resolve_runtime "$preferred_runtime"); then + echo "No available iOS simulator runtime found. Install one in Xcode (Settings > Platforms) and retry." >&2 + return 1 + fi + runtime_id="$(echo "$choice" | cut -d'|' -f1)" + runtime_name="$(echo "$choice" | cut -d'|' -f2)" + + local display_name="${base_name} (${runtime_name})" + + if ! device_type=$(devicetype_id_for_name "$base_name"); then + echo "Device type '${base_name}' is unavailable in this Xcode install. Skipping ${display_name}." >&2 + return 0 + fi + + if existing_udid=$(existing_device_udid_any_runtime "$display_name"); [[ -n "${existing_udid}" ]]; then + if device_data_dir_exists "$existing_udid"; then + echo "Found existing ${display_name}: ${existing_udid}" + return 0 + fi + echo "Existing ${display_name} (${existing_udid}) is missing its data directory. Deleting stale simulator..." + xcrun simctl delete "$existing_udid" || true + fi + + echo "Creating ${display_name}..." + xcrun simctl create "$display_name" "$device_type" "$runtime_id" + echo "Created ${display_name}" +} + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + # Only env defaults when sourced. + return 0 +fi + +action="${1:-}" +shift || true + +start_ios() { + local flavor="${IOS_FLAVOR:-latest}" + if [[ "$flavor" == "minsdk" ]]; then + export IOS_DEVICE_NAMES="${IOS_DEVICE_NAMES:-iPhone 14}" + export IOS_RUNTIME="${IOS_RUNTIME:-18.5}" + export DETOX_IOS_DEVICE="${DETOX_IOS_DEVICE:-iPhone 14}" + else + export IOS_DEVICE_NAMES="${IOS_DEVICE_NAMES:-iPhone 14,iPhone 17}" + export IOS_RUNTIME="${IOS_RUNTIME:-}" + export DETOX_IOS_DEVICE="${DETOX_IOS_DEVICE:-iPhone 17}" + fi + + ensure_developer_dir + require_tool xcrun + require_tool jq + ensure_simctl + ensure_core_sim_service || return 1 + + IFS=',' read -r -a devices <<<"${IOS_DEVICE_NAMES}" + local runtime_choice runtime_id runtime_name + runtime_choice="$(resolve_runtime "${IOS_RUNTIME:-}")" + runtime_id="$(echo "${runtime_choice}" | cut -d'|' -f1)" + runtime_name="$(echo "${runtime_choice}" | cut -d'|' -f2)" + + for device in "${devices[@]}"; do + ensure_device "$(echo "$device" | xargs)" "$runtime_name" + done + + local sim_device="${DETOX_IOS_DEVICE:-$(echo "${devices[0]}" | xargs)}" + echo "Starting iOS simulator: ${sim_device}${runtime_name:+ (runtime ${runtime_name})}" + xcrun simctl boot "$sim_device" >/dev/null 2>&1 || true + open -a Simulator + + if [[ "${IOS_MANAGER_FOREGROUND:-}" == "1" || "${IOS_MANAGER_FOREGROUND:-}" == "true" ]]; then + tail -f /dev/null + fi +} + +stop_ios() { + require_tool xcrun + echo "Shutting down all simulators..." + xcrun simctl shutdown all >/dev/null 2>&1 || true +} + +reset_ios() { + require_tool xcrun + echo "Erasing all simulators..." + xcrun simctl erase all >/dev/null 2>&1 || true +} + +case "$action" in + start) start_ios ;; + stop) stop_ios ;; + reset) reset_ios ;; + *) echo "Usage: ios.sh {start|stop|reset}" >&2; exit 1 ;; +esac diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 000000000..25f71ea28 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail + +npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN:?NPM_TOKEN is required}" +yarn install --immutable +yarn build +yarn release diff --git a/scripts/update.sh b/scripts/update.sh new file mode 100755 index 000000000..6e26495c5 --- /dev/null +++ b/scripts/update.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +set -euo pipefail + +target="${1:-all}" +export NIX_CONFIG="${NIX_CONFIG:-experimental-features = nix-command flakes}" + +project_root="${PROJECT_ROOT:-}" +if [ -z "$project_root" ]; then + project_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" +fi +cd "$project_root" + +update_flox_envs() { + update_env() { + local dir="$1" + local abs="$project_root/$dir" + local manifest="$abs/.flox/env/manifest.toml" + local has_includes=false + + if [ -f "$manifest" ] && grep -q "environments" "$manifest"; then + has_includes=true + fi + + echo "Updating flox environment: $abs" + flox update -d "$abs" + if "$has_includes"; then + if ! flox include upgrade -d "$abs"; then + flox list -d "$abs" >/dev/null || true + flox include upgrade -d "$abs" + fi + fi + # Ensure manifest/lock are in sync (regenerate lock if hooks changed) + flox list -d "$abs" >/dev/null || true + } + + # Update base envs first (no includes), then include-aware envs in dependency order. + update_env "env/common" + update_env "env/nodejs" + update_env "env/android/android-common" + update_env "env/android/min" + update_env "env/android/latest" + update_env "env/ios" + update_env "env/ios/min" + update_env "env/ios/latest" + update_env "." +} + +update_yarn() { + yarn install --immutable || yarn install --check-cache +} + +update_gradle() { + if [ -d examples/E2E/android ]; then + (cd examples/E2E/android && ./gradlew --refresh-dependencies) || true + fi +} + +update_pods() { + if [ -d examples/E2E ]; then + (cd examples/E2E && yarn e2e pods) || true + fi +} + +update_nix() { + nix --extra-experimental-features "nix-command flakes" flake update env/android/min || true + nix --extra-experimental-features "nix-command flakes" flake update env/android/latest || true +} + +case "$target" in + flox) update_flox_envs ;; + yarn) update_yarn ;; + gradle) update_gradle ;; + pods|cocoapods) update_pods ;; + nix) update_nix ;; + all) + update_flox_envs + update_yarn + update_gradle + update_pods + update_nix + ;; + *) + echo "Unknown update target: $target" + echo "Valid targets: all, flox, yarn, gradle, pods, nix" + exit 1 + ;; +esac + +echo "Update ($target) complete." diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 000000000..45cca9cc9 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,13 @@ +[formatter.nix] +command = "nixfmt" +includes = ["*.nix"] + +[formatter.prettier] +command = "prettier" +options = ["--write"] +includes = ["*.js", "*.jsx", "*.ts", "*.tsx", "*.md", "*.yml", "*.yaml", "*.json"] + +[formatter.shfmt] +command = "shfmt" +options = ["-w", "-s", "-i", "2"] +includes = ["*.sh"] diff --git a/wiki/ci.md b/wiki/ci.md new file mode 100644 index 000000000..26ad631ff --- /dev/null +++ b/wiki/ci.md @@ -0,0 +1,22 @@ +## CI workflows + +We split CI to keep PRs fast while still covering E2E regularly. + +- `ci-fast.yml`: runs on push/PR to `master`/`beta` (docs ignored). Uses `flox/install-flox-action@v2.2.0` then runs `scripts/build.sh` (install, build, lint, unit tests). Concurrency cancels superseded runs per ref. +- `ci-e2e-optional.yml`: E2E on-demand. Triggers via PR label `run-e2e` or `workflow_dispatch` (with optional `platforms` input). Uses the flox install action, runs iOS latest (Xcode 26.1.1, runtime 26.1) and Android latest (API 33) with flox-managed simulators/emulators. +- `ci-e2e-nightly.yml`: scheduled 06:00 UTC (and manual dispatch). Uses the flox install action and runs full matrix: iOS min (Xcode 16.1, runtime 18.5) and latest (26.1), Android min (API 21) and latest (API 33). Uses flox services for bootstrapping devices. + +Tips: +- Keep PRs green with `ci-fast`. Add the `run-e2e` label to a PR to kick off optional E2E or dispatch manually from Actions. +- Nightly runs are authoritative for regression coverage; adjust matrices there when bumping platform minimums. + +### Helpful yarn commands +- `yarn test:fast`: lint + typecheck + unit tests. +- `yarn test:full`: lint + typecheck + workspace builds + all workspace tests. +- `yarn format` / `yarn format:check`: treefmt (prettier + nixfmt-rfc-style + taplo + shfmt) for JS/TS/MD/YAML/JSON/Nix/TOML/shell. +- Updates: `yarn update:yarn` (deps), `yarn update:gradle`, `yarn update:pods`, `yarn update:nix` (flake inputs), `yarn update:flox` (flox locks + package managers). +- Cleans: `yarn clean:all` (workspaces + Android emulator reset + Gradle caches + iOS sim/DerivedData + nix gc + flox gc); targeted variants (`clean:workspaces`, `clean:android`, `clean:ios`, `clean:nix`, `clean:flox`). +- `yarn lint:fix`: eslint with auto-fix. +- `yarn e2e:android` / `yarn e2e:ios`: run platform E2E flows (assumes flox env provides emulator/simulator). +- `yarn update:flox`: regenerate flox lockfiles in dependency-safe order (requires Nix flake support). + diff --git a/wiki/flox.md b/wiki/flox.md new file mode 100644 index 000000000..6c2cafbc6 --- /dev/null +++ b/wiki/flox.md @@ -0,0 +1,39 @@ +## Flox environments + +Flox devshells live in `.flox/env/manifest.toml` and compose `env/common`, `env/nodejs`, `env/android/min`, `env/android/latest`, `env/ios/min`, and `env/ios/latest`. Activation exports `PROJECT_ROOT`, wires the pinned Android SDK unless you set `ANDROID_HOME` or `ANDROID_SDK_ROOT`, and seeds Detox defaults for `DETOX_AVD` and `DETOX_IOS_DEVICE`. Use `flox activate . --devshell default -- ` for builds and tests; lean shells `--devshell android` or `--devshell ios` are also available. + +Emulators and simulators are managed by flox services instead of helper scripts. Start Android with `flox services start android-emulator-min` (API 21) or `flox services start android-emulator-latest` (API 33; architecture is chosen automatically). Override the target with `ANDROID_AVD` and `ANDROID_SYSTEM_IMAGE`; headless options come from `ANDROID_EMULATOR_HEADLESS_FLAGS`. Start iOS with `flox services start ios-simulator-min` or `flox services start ios-simulator-latest`, and override with `IOS_SIM_DEVICE` and `IOS_SIM_RUNTIME`. If you do not set `DETOX_IOS_DEVICE`, activation fills it from the simulator choice. AVD data is cached in `.flox/cache/android/avd` so CI and local runs stay isolated from your global `~/.android`. + +The environment tree is layered but flatter. The root manifest composes every sub-environment so `flox activate .` pulls in common tooling, Node, Android min, Android latest, and iOS min/latest. `env/common` is the base and sets shared variables like `PROJECT_ROOT`. Android-specific configuration lives under `env/android`: `android-common` inherits from `env/common`, while `android-min` and `android-latest` inherit from `android-common`; both are composed directly by the root manifest. iOS follows the same pattern: `env/ios` inherits from `env/common` and `env/nodejs`, while `env/ios/min` and `env/ios/latest` inherit from `env/ios` and are composed at the root. + +Visual dependency graph (includes): +``` +.flox/env/manifest.toml +├─ env/common +├─ env/nodejs +├─ env/android/min +│ └─ env/android/android-common +│ └─ env/common +├─ env/android/latest +│ └─ env/android/android-common +│ └─ env/common +├─ env/ios/min +│ └─ env/ios +│ ├─ env/common +│ └─ env/nodejs +└─ env/ios/latest + └─ env/ios + ├─ env/common + └─ env/nodejs +``` + +Install flox from https://flox.dev/docs/install and ensure `~/.flox/bin` is on `PATH`. Run the full build, lint, and test suite with `flox activate . --devshell default -- bash scripts/build.sh`. + +For Android E2E, start the emulator service first, then run: +``` +flox activate . --devshell default -- bash -lc "yarn install --immutable && yarn e2e install && yarn build && yarn e2e build:android && yarn e2e test:android" +``` +For iOS E2E on macOS, start the simulator service first, then run: +``` +flox activate . --devshell default -- bash -lc "yarn install --immutable && yarn e2e install && yarn e2e pods && yarn build && yarn e2e build:ios && yarn e2e test:ios" +``` diff --git a/wiki/release.md b/wiki/release.md new file mode 100644 index 000000000..a1205baff --- /dev/null +++ b/wiki/release.md @@ -0,0 +1,28 @@ +## Release guide + +This repo uses semantic-release with multi-semantic-release to version and publish all public workspaces. Tags follow `${name}-v${version}` and releases are cut from `master` (stable) and `beta` (prerelease). + +### Prerequisites +- Secrets: `GH_TOKEN` (repo `contents` write) and `NPM_TOKEN` (publish). CI also passes `YARN_NPM_AUTH_TOKEN` (same as `NPM_TOKEN`). +- Git history: full clone (`fetch-depth: 0`) so semantic-release can find prior tags. +- Commit format: conventional commits; commitlint is already configured. + +### What runs +- Config files: `release.config.js` (single-package defaults) and `multi-release.config.js` (multi-package orchestration, sequential init/prepare, ignore private packages, tag format/branches). +- Plugins: commit analyzer + release notes, changelog (`CHANGELOG.md`), npm publish, GitHub release (no success comment), and git commit of changelog + package.json. +- Script: root `yarn release` runs `multi-semantic-release` with the above config per public package. + +### CI/CD path (recommended) +1) Ensure `master`/`beta` are green. Merges must use conventional commits. +2) Trigger `Publish` workflow in Actions. Inputs are tokens only; workflow fetches full history, installs flox, then runs the flake shell to execute `flox/scripts/release.sh`. +3) Outputs: package tags (`${name}-vX.Y.Z`), npm publishes, GitHub releases, and updated changelog commits pushed back via the workflow token. + +### Local dry run +1) `GH_TOKEN= NPM_TOKEN= YARN_NPM_AUTH_TOKEN=` (GH token needs `contents` write; npm token can be automation/classic publish). +2) `flox activate . --devshell default -- bash flox/scripts/release.sh -- --dry-run` to see what would publish. Omit `--dry-run` to actually publish (only do this if you intend to release from your machine). + +### Tips and gotchas +- Only public packages release; private workspaces (e.g., `packages/shared`) are ignored. +- Tag pattern is important: keep `${name}-v${version}` if you create manual tags for debugging. +- If adding a new branch for releases, update both `release.config.js` and `multi-release.config.js`. +- Keep yarn.lock in sync before releasing to avoid install differences between CI and local. diff --git a/yarn.lock b/yarn.lock index 4767704ef..3eee16575 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3380,7 +3380,7 @@ __metadata: version: 0.0.0-use.local resolution: "@segment/analytics-react-native-plugin-amplitude-session@workspace:packages/plugins/plugin-amplitudeSession" dependencies: - "@segment/analytics-react-native": "npm:^2.18.0" + "@segment/analytics-react-native": "npm:^2.21.4" "@segment/analytics-rn-shared": "workspace:^" "@segment/sovran-react-native": "npm:^1.1.0" "@types/jest": "npm:^29.5.8" @@ -3615,7 +3615,7 @@ __metadata: languageName: unknown linkType: soft -"@segment/analytics-react-native@npm:^2.18.0, @segment/analytics-react-native@workspace:packages/core": +"@segment/analytics-react-native@npm:^2.18.0, @segment/analytics-react-native@npm:^2.21.4, @segment/analytics-react-native@workspace:packages/core": version: 0.0.0-use.local resolution: "@segment/analytics-react-native@workspace:packages/core" dependencies: