mirror of
https://github.com/EthanShoeDev/fressh.git
synced 2026-01-11 06:12:51 +00:00
flake
This commit is contained in:
322
.dockerignore
Normal file
322
.dockerignore
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
**/node_modules
|
||||||
|
**/.pnp
|
||||||
|
**/.pnp.js
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
**/coverage
|
||||||
|
|
||||||
|
# Turbo
|
||||||
|
**/.turbo
|
||||||
|
|
||||||
|
# Vercel
|
||||||
|
**/.vercel
|
||||||
|
|
||||||
|
# Build Outputs
|
||||||
|
**/.next/
|
||||||
|
**/out/
|
||||||
|
**/dist
|
||||||
|
|
||||||
|
|
||||||
|
# Debug
|
||||||
|
**/npm-debug.log*
|
||||||
|
**/yarn-debug.log*
|
||||||
|
**/yarn-error.log*
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
**/.DS_Store
|
||||||
|
**/*.pem
|
||||||
|
|
||||||
|
**/tmp/
|
||||||
|
**/**/tsconfig.tsbuildinfo
|
||||||
|
|
||||||
|
**/dep-log.json
|
||||||
|
|
||||||
|
**/mnt/*
|
||||||
|
**/*.log
|
||||||
|
**/.turbo/
|
||||||
|
# From apps/mobile/.gitignore
|
||||||
|
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
apps/mobile/**/node_modules/
|
||||||
|
|
||||||
|
# Expo
|
||||||
|
apps/mobile/**/.expo/
|
||||||
|
apps/mobile/**/dist/
|
||||||
|
apps/mobile/**/web-build/
|
||||||
|
apps/mobile/**/expo-env.d.ts
|
||||||
|
|
||||||
|
# Native
|
||||||
|
apps/mobile/**/.kotlin/
|
||||||
|
apps/mobile/**/*.orig.*
|
||||||
|
apps/mobile/**/*.jks
|
||||||
|
apps/mobile/**/*.p8
|
||||||
|
apps/mobile/**/*.p12
|
||||||
|
apps/mobile/**/*.key
|
||||||
|
apps/mobile/**/*.mobileprovision
|
||||||
|
|
||||||
|
# Metro
|
||||||
|
apps/mobile/**/.metro-health-check*
|
||||||
|
|
||||||
|
# debug
|
||||||
|
apps/mobile/**/npm-debug.*
|
||||||
|
apps/mobile/**/yarn-debug.*
|
||||||
|
apps/mobile/**/yarn-error.*
|
||||||
|
|
||||||
|
# macOS
|
||||||
|
apps/mobile/**/.DS_Store
|
||||||
|
apps/mobile/**/*.pem
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
apps/mobile/**/.env*.local
|
||||||
|
|
||||||
|
# typescript
|
||||||
|
apps/mobile/**/*.tsbuildinfo
|
||||||
|
|
||||||
|
# https://docs.expo.dev/workflow/continuous-native-generation/
|
||||||
|
apps/mobile/**/android/
|
||||||
|
apps/mobile/**/ios/
|
||||||
|
|
||||||
|
# From apps/web/.gitignore
|
||||||
|
# build output
|
||||||
|
apps/web/**/dist/
|
||||||
|
|
||||||
|
# generated types
|
||||||
|
apps/web/**/.astro/
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
apps/web/**/node_modules/
|
||||||
|
|
||||||
|
# logs
|
||||||
|
apps/web/**/npm-debug.log*
|
||||||
|
apps/web/**/yarn-debug.log*
|
||||||
|
apps/web/**/yarn-error.log*
|
||||||
|
apps/web/**/pnpm-debug.log*
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
apps/web/**/.env
|
||||||
|
apps/web/**/.env.production
|
||||||
|
|
||||||
|
# macOS-specific files
|
||||||
|
apps/web/**/.DS_Store
|
||||||
|
|
||||||
|
# jetbrains setting folder
|
||||||
|
apps/web/**/.idea/
|
||||||
|
|
||||||
|
# From packages/react-native-uniffi-russh/.gitignore
|
||||||
|
# OSX
|
||||||
|
#
|
||||||
|
packages/react-native-uniffi-russh/**/.DS_Store
|
||||||
|
|
||||||
|
# XDE
|
||||||
|
packages/react-native-uniffi-russh/**/.expo/
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
packages/react-native-uniffi-russh/**/.vscode/
|
||||||
|
packages/react-native-uniffi-russh/**/jsconfig.json
|
||||||
|
|
||||||
|
# Xcode
|
||||||
|
#
|
||||||
|
packages/react-native-uniffi-russh/**/build/
|
||||||
|
packages/react-native-uniffi-russh/**/*.pbxuser
|
||||||
|
!packages/react-native-uniffi-russh/**/default.pbxuser
|
||||||
|
packages/react-native-uniffi-russh/**/*.mode1v3
|
||||||
|
!packages/react-native-uniffi-russh/**/default.mode1v3
|
||||||
|
packages/react-native-uniffi-russh/**/*.mode2v3
|
||||||
|
!packages/react-native-uniffi-russh/**/default.mode2v3
|
||||||
|
packages/react-native-uniffi-russh/**/*.perspectivev3
|
||||||
|
!packages/react-native-uniffi-russh/**/default.perspectivev3
|
||||||
|
packages/react-native-uniffi-russh/**/xcuserdata
|
||||||
|
packages/react-native-uniffi-russh/**/*.xccheckout
|
||||||
|
packages/react-native-uniffi-russh/**/*.moved-aside
|
||||||
|
packages/react-native-uniffi-russh/**/DerivedData
|
||||||
|
packages/react-native-uniffi-russh/**/*.hmap
|
||||||
|
packages/react-native-uniffi-russh/**/*.ipa
|
||||||
|
packages/react-native-uniffi-russh/**/*.xcuserstate
|
||||||
|
packages/react-native-uniffi-russh/**/project.xcworkspace
|
||||||
|
packages/react-native-uniffi-russh/**/**/.xcode.env.local
|
||||||
|
|
||||||
|
# Android/IJ
|
||||||
|
#
|
||||||
|
packages/react-native-uniffi-russh/**/.classpath
|
||||||
|
packages/react-native-uniffi-russh/**/.cxx
|
||||||
|
packages/react-native-uniffi-russh/**/.gradle
|
||||||
|
packages/react-native-uniffi-russh/**/.idea
|
||||||
|
packages/react-native-uniffi-russh/**/.project
|
||||||
|
packages/react-native-uniffi-russh/**/.settings
|
||||||
|
packages/react-native-uniffi-russh/**/local.properties
|
||||||
|
packages/react-native-uniffi-russh/**/android.iml
|
||||||
|
|
||||||
|
# Cocoapods
|
||||||
|
#
|
||||||
|
packages/react-native-uniffi-russh/**/example/ios/Pods
|
||||||
|
|
||||||
|
# Ruby
|
||||||
|
packages/react-native-uniffi-russh/**/example/vendor/
|
||||||
|
|
||||||
|
# node.js
|
||||||
|
#
|
||||||
|
packages/react-native-uniffi-russh/**/node_modules/
|
||||||
|
packages/react-native-uniffi-russh/**/npm-debug.log
|
||||||
|
packages/react-native-uniffi-russh/**/yarn-debug.log
|
||||||
|
packages/react-native-uniffi-russh/**/yarn-error.log
|
||||||
|
|
||||||
|
# BUCK
|
||||||
|
packages/react-native-uniffi-russh/**/buck-out/
|
||||||
|
packages/react-native-uniffi-russh/**/\.buckd/
|
||||||
|
packages/react-native-uniffi-russh/**/android/app/libs
|
||||||
|
packages/react-native-uniffi-russh/**/android/keystores/debug.keystore
|
||||||
|
|
||||||
|
# Yarn
|
||||||
|
packages/react-native-uniffi-russh/**/.yarn/*
|
||||||
|
!packages/react-native-uniffi-russh/**/.yarn/patches
|
||||||
|
!packages/react-native-uniffi-russh/**/.yarn/plugins
|
||||||
|
!packages/react-native-uniffi-russh/**/.yarn/releases
|
||||||
|
!packages/react-native-uniffi-russh/**/.yarn/sdks
|
||||||
|
!packages/react-native-uniffi-russh/**/.yarn/versions
|
||||||
|
|
||||||
|
# Expo
|
||||||
|
packages/react-native-uniffi-russh/**/.expo/
|
||||||
|
|
||||||
|
# Turborepo
|
||||||
|
packages/react-native-uniffi-russh/**/.turbo/
|
||||||
|
|
||||||
|
# generated by bob
|
||||||
|
packages/react-native-uniffi-russh/lib
|
||||||
|
|
||||||
|
# React Native Codegen
|
||||||
|
packages/react-native-uniffi-russh/**/ios/generated
|
||||||
|
packages/react-native-uniffi-russh/**/android/generated
|
||||||
|
|
||||||
|
# React Native Nitro Modules
|
||||||
|
packages/react-native-uniffi-russh/**/nitrogen/
|
||||||
|
|
||||||
|
# From uniffi-bindgen-react-native
|
||||||
|
# rust_modules/
|
||||||
|
packages/react-native-uniffi-russh/**/*.a
|
||||||
|
packages/react-native-uniffi-russh/android
|
||||||
|
packages/react-native-uniffi-russh/ios
|
||||||
|
packages/react-native-uniffi-russh/cpp
|
||||||
|
packages/react-native-uniffi-russh/src/*
|
||||||
|
packages/react-native-uniffi-russh/**/*.xcframework
|
||||||
|
packages/react-native-uniffi-russh/**/*.podspec
|
||||||
|
|
||||||
|
!packages/react-native-uniffi-russh/**/src/api.ts
|
||||||
|
# From packages/react-native-uniffi-russh/rust/.gitignore
|
||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/rust,xcode,android
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=rust,xcode,android
|
||||||
|
|
||||||
|
### Android ###
|
||||||
|
# Gradle files
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.gradle/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/build/
|
||||||
|
|
||||||
|
# Local configuration file (sdk path, etc)
|
||||||
|
packages/react-native-uniffi-russh/rust/**/local.properties
|
||||||
|
|
||||||
|
# Log/OS Files
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.log
|
||||||
|
|
||||||
|
# Android Studio generated files and folders
|
||||||
|
packages/react-native-uniffi-russh/rust/**/captures/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.externalNativeBuild/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.cxx/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.apk
|
||||||
|
packages/react-native-uniffi-russh/rust/**/output.json
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.iml
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.idea/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/misc.xml
|
||||||
|
packages/react-native-uniffi-russh/rust/**/deploymentTargetDropDown.xml
|
||||||
|
packages/react-native-uniffi-russh/rust/**/render.experimental.xml
|
||||||
|
|
||||||
|
# Keystore files
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.jks
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.keystore
|
||||||
|
|
||||||
|
# Google Services (e.g. APIs or Firebase)
|
||||||
|
packages/react-native-uniffi-russh/rust/**/google-services.json
|
||||||
|
|
||||||
|
# Android Profiling
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.hprof
|
||||||
|
|
||||||
|
### Android Patch ###
|
||||||
|
packages/react-native-uniffi-russh/rust/**/gen-external-apklibs
|
||||||
|
|
||||||
|
# Replacement of .externalNativeBuild directories introduced
|
||||||
|
# with Android Studio 3.5.
|
||||||
|
|
||||||
|
### Rust ###
|
||||||
|
# Generated by Cargo
|
||||||
|
# will have compiled files and executables
|
||||||
|
packages/react-native-uniffi-russh/rust/**/debug/
|
||||||
|
packages/react-native-uniffi-russh/rust/**/target/
|
||||||
|
|
||||||
|
# These are backup files generated by rustfmt
|
||||||
|
packages/react-native-uniffi-russh/rust/**/**/*.rs.bk
|
||||||
|
|
||||||
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.pdb
|
||||||
|
|
||||||
|
### Xcode ###
|
||||||
|
## User settings
|
||||||
|
packages/react-native-uniffi-russh/rust/**/xcuserdata/
|
||||||
|
|
||||||
|
## Xcode 8 and earlier
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.xcscmblueprint
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.xccheckout
|
||||||
|
|
||||||
|
### Xcode Patch ###
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.xcodeproj/*
|
||||||
|
!packages/react-native-uniffi-russh/rust/**/*.xcodeproj/project.pbxproj
|
||||||
|
!packages/react-native-uniffi-russh/rust/**/*.xcodeproj/xcshareddata/
|
||||||
|
!packages/react-native-uniffi-russh/rust/**/*.xcodeproj/project.xcworkspace/
|
||||||
|
!packages/react-native-uniffi-russh/rust/**/*.xcworkspace/contents.xcworkspacedata
|
||||||
|
packages/react-native-uniffi-russh/rust/*.gcno
|
||||||
|
packages/react-native-uniffi-russh/rust/**/**/xcshareddata/WorkspaceSettings.xcsettings
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/rust,xcode,android
|
||||||
|
|
||||||
|
# Swift Package Manager
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.build/
|
||||||
|
|
||||||
|
# macOS Ignores
|
||||||
|
packages/react-native-uniffi-russh/rust/**/.DS_Store
|
||||||
|
|
||||||
|
# Android (cargo-ndk outputs; they end up in the Android source tree)
|
||||||
|
packages/react-native-uniffi-russh/rust/**/*.so
|
||||||
|
|
||||||
|
# From packages/react-native-uniffi-russh/rust/uniffi-russh/.gitignore
|
||||||
|
!packages/react-native-uniffi-russh/rust/uniffi-russh/**/.vscode
|
||||||
|
packages/react-native-uniffi-russh/rust/uniffi-russh/**/mnt/
|
||||||
|
# From packages/react-native-xtermjs-webview/.gitignore
|
||||||
|
# Logs
|
||||||
|
packages/react-native-xtermjs-webview/**/logs
|
||||||
|
packages/react-native-xtermjs-webview/**/*.log
|
||||||
|
packages/react-native-xtermjs-webview/**/npm-debug.log*
|
||||||
|
packages/react-native-xtermjs-webview/**/yarn-debug.log*
|
||||||
|
packages/react-native-xtermjs-webview/**/yarn-error.log*
|
||||||
|
packages/react-native-xtermjs-webview/**/pnpm-debug.log*
|
||||||
|
packages/react-native-xtermjs-webview/**/lerna-debug.log*
|
||||||
|
|
||||||
|
packages/react-native-xtermjs-webview/**/node_modules
|
||||||
|
packages/react-native-xtermjs-webview/**/dist
|
||||||
|
packages/react-native-xtermjs-webview/**/dist-internal
|
||||||
|
packages/react-native-xtermjs-webview/**/dist-ssr
|
||||||
|
packages/react-native-xtermjs-webview/**/*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
packages/react-native-xtermjs-webview/**/.vscode/*
|
||||||
|
!packages/react-native-xtermjs-webview/**/.vscode/extensions.json
|
||||||
|
packages/react-native-xtermjs-webview/**/.idea
|
||||||
|
packages/react-native-xtermjs-webview/**/.DS_Store
|
||||||
|
packages/react-native-xtermjs-webview/**/*.suo
|
||||||
|
packages/react-native-xtermjs-webview/**/*.ntvs*
|
||||||
|
packages/react-native-xtermjs-webview/**/*.njsproj
|
||||||
|
packages/react-native-xtermjs-webview/**/*.sln
|
||||||
|
packages/react-native-xtermjs-webview/**/*.sw?
|
||||||
|
|
||||||
21
.github/actions/setup/action.yml
vendored
21
.github/actions/setup/action.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
name: Setup
|
|
||||||
description: Perform standard setup and install dependencies using pnpm.
|
|
||||||
inputs:
|
|
||||||
node-version:
|
|
||||||
description: The version of Node.js to install
|
|
||||||
required: true
|
|
||||||
default: 24.5.0
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v3
|
|
||||||
- name: Install node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
cache: pnpm
|
|
||||||
node-version: ${{ inputs.node-version }}
|
|
||||||
- name: Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: pnpm install
|
|
||||||
29
.github/workflows/check.yml
vendored
29
.github/workflows/check.yml
vendored
@@ -20,8 +20,35 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache Nix Store
|
||||||
|
uses: nix-community/cache-nix-action@main
|
||||||
|
with:
|
||||||
|
primary-key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }}
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
|
||||||
|
- name: Load devShell environment
|
||||||
|
uses: nicknovitski/nix-develop@main
|
||||||
|
with:
|
||||||
|
arguments: .#android-remote
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: ./.github/actions/setup
|
run: pnpm install
|
||||||
- run: pnpm exec turbo lint:check
|
- run: pnpm exec turbo lint:check
|
||||||
|
|
||||||
# test:
|
# test:
|
||||||
|
|||||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM nixos/nix:latest
|
||||||
|
|
||||||
|
# Enable flakes and nix-command
|
||||||
|
RUN mkdir -p /etc/nix && \
|
||||||
|
echo 'experimental-features = nix-command flakes' > /etc/nix/nix.conf && \
|
||||||
|
echo 'accept-flake-config = true' >> /etc/nix/nix.conf
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
COPY flake.nix flake.lock .
|
||||||
|
RUN nix develop .#android-remote
|
||||||
|
|
||||||
|
# Pre-populate pnpm store from lockfile only (fast, cacheable)
|
||||||
|
COPY pnpm-lock.yaml ./
|
||||||
|
COPY patches/* ./patches/
|
||||||
|
RUN nix develop .#android-remote -c pnpm fetch
|
||||||
|
|
||||||
|
# Now copy full source and link from the store (no network)
|
||||||
|
COPY . .
|
||||||
|
RUN nix develop .#android-remote -c pnpm install --offline --frozen-lockfile
|
||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -9,11 +9,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757621816,
|
"lastModified": 1758658832,
|
||||||
"narHash": "sha256-r1cZQcvqcF7YUsw70Gxb2eGzuHl/hQHs01WNNeWklIc=",
|
"narHash": "sha256-CWJUlYTqdCuWl6a7IYbrEficoz7gKouD7zzuHnko3sI=",
|
||||||
"owner": "tadfisher",
|
"owner": "tadfisher",
|
||||||
"repo": "android-nixpkgs",
|
"repo": "android-nixpkgs",
|
||||||
"rev": "feba9bc6e12243ba9ee9bdb236866e1209c55a78",
|
"rev": "ee542f7fee389dca5c04622a8fb33459d825cd08",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -63,11 +63,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757487488,
|
"lastModified": 1758427187,
|
||||||
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
"narHash": "sha256-pHpxZ/IyCwoTQPtFIAG2QaxuSm8jWzrzBGjwQZIttJc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
"rev": "554be6495561ff07b6c724047bdd7e0716aa7b46",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
91
flake.nix
91
flake.nix
@@ -1,5 +1,5 @@
|
|||||||
|
# nix flake update
|
||||||
{
|
{
|
||||||
# nix run nixpkgs#alejandra -- format ./flake.nix
|
|
||||||
description = "Expo RN devshells (local emulator / remote AVD)";
|
description = "Expo RN devshells (local emulator / remote AVD)";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
@@ -10,6 +10,15 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://android-nixpkgs.cachix.org"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"android-nixpkgs.cachix.org-1:2lZoPmwoyTVGaNDHqa6A32tdn8Gc0aMWBRrfXN1H3dQ="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
@@ -30,28 +39,56 @@
|
|||||||
);
|
);
|
||||||
in {
|
in {
|
||||||
devShells = forAllSystems ({pkgs}: let
|
devShells = forAllSystems ({pkgs}: let
|
||||||
|
defaultPkgs = with pkgs; [
|
||||||
|
# System
|
||||||
|
bash
|
||||||
|
git
|
||||||
|
pkg-config
|
||||||
|
jq
|
||||||
|
# JS
|
||||||
|
nodejs_22
|
||||||
|
turbo
|
||||||
|
nodePackages.pnpm
|
||||||
|
yarn
|
||||||
|
watchman
|
||||||
|
# Rust
|
||||||
|
rustc
|
||||||
|
clippy
|
||||||
|
rustfmt
|
||||||
|
cargo
|
||||||
|
cargo-ndk
|
||||||
|
# Android
|
||||||
|
jdk17
|
||||||
|
gradle_8
|
||||||
|
# Misc
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
just
|
||||||
|
alejandra
|
||||||
|
];
|
||||||
|
|
||||||
|
defaultAndroidPkgs = sdk:
|
||||||
|
with sdk; [
|
||||||
|
cmdline-tools-latest
|
||||||
|
platform-tools # adb/fastboot
|
||||||
|
platforms-android-36
|
||||||
|
build-tools-36-0-0
|
||||||
|
ndk-27-1-12297006
|
||||||
|
];
|
||||||
|
|
||||||
makeAndroidSdk = mode: let
|
makeAndroidSdk = mode: let
|
||||||
androidSdk = pkgs.androidSdk (
|
androidSdk = pkgs.androidSdk (
|
||||||
sdk:
|
sdk:
|
||||||
if mode == "full"
|
if mode == "full"
|
||||||
then
|
then
|
||||||
(with sdk; [
|
(with sdk;
|
||||||
cmdline-tools-latest
|
[
|
||||||
platform-tools
|
emulator
|
||||||
emulator
|
system-images-android-36-0-Baklava-google-apis-playstore-x86-64
|
||||||
build-tools-36-0-0
|
]
|
||||||
platforms-android-36
|
++ (defaultAndroidPkgs sdk))
|
||||||
system-images-android-36-0-Baklava-google-apis-playstore-x86-64
|
|
||||||
# Add NDK + CMake for native builds
|
|
||||||
ndk-26-1-10909125
|
|
||||||
cmake-3-22-1
|
|
||||||
])
|
|
||||||
else if mode == "remote"
|
else if mode == "remote"
|
||||||
then
|
then (with sdk; (defaultAndroidPkgs sdk))
|
||||||
(with sdk; [
|
|
||||||
cmdline-tools-latest # ← required for a valid SDK
|
|
||||||
platform-tools # adb/fastboot
|
|
||||||
])
|
|
||||||
else throw "makeAndroidSdk: unknown mode '${mode}'. Use \"full\" or \"remote\"."
|
else throw "makeAndroidSdk: unknown mode '${mode}'. Use \"full\" or \"remote\"."
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -64,20 +101,6 @@
|
|||||||
|
|
||||||
fullAndroidSdk = makeAndroidSdk "full";
|
fullAndroidSdk = makeAndroidSdk "full";
|
||||||
remoteAndroidSdk = makeAndroidSdk "remote";
|
remoteAndroidSdk = makeAndroidSdk "remote";
|
||||||
|
|
||||||
defaultPkgs = with pkgs; [
|
|
||||||
nodejs_22
|
|
||||||
nodePackages.pnpm
|
|
||||||
git
|
|
||||||
just
|
|
||||||
jq
|
|
||||||
watchman
|
|
||||||
jdk17
|
|
||||||
gradle_8
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
in {
|
in {
|
||||||
# Minimal: only universal dev tools you always want
|
# Minimal: only universal dev tools you always want
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
@@ -112,6 +135,9 @@
|
|||||||
hash -r
|
hash -r
|
||||||
|
|
||||||
echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"
|
echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"
|
||||||
|
export ANDROID_NDK_ROOT="$ANDROID_SDK_ROOT/ndk/27.1.12297006"
|
||||||
|
export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"
|
||||||
|
export ANDROID_NDK="$ANDROID_NDK_ROOT"
|
||||||
which -a adb || true
|
which -a adb || true
|
||||||
which -a emulator || true
|
which -a emulator || true
|
||||||
which -a avdmanager || true
|
which -a avdmanager || true
|
||||||
@@ -128,7 +154,7 @@
|
|||||||
packages =
|
packages =
|
||||||
defaultPkgs
|
defaultPkgs
|
||||||
++ [
|
++ [
|
||||||
remoteAndroidSdk.androidSdk # provides adb/fastboot only
|
(pkgs.androidSdk (sdk: (defaultAndroidPkgs sdk)))
|
||||||
pkgs.scrcpy
|
pkgs.scrcpy
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
@@ -143,5 +169,6 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
formatter = forAllSystems ({pkgs}: pkgs.alejandra);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
10
justfile
Normal file
10
justfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
docker-build:
|
||||||
|
docker build -t fressh .
|
||||||
|
|
||||||
|
docker-run:
|
||||||
|
docker run -it --rm fressh
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"fmt:root": "prettier --cache --write .",
|
"fmt:root": "prettier --cache --write .",
|
||||||
"fmt:check:root": "prettier --check .",
|
"fmt:check:root": "prettier --check .",
|
||||||
|
"fmt:root:nix": "nix fmt flake.nix",
|
||||||
|
"fmt:check:root:nix": "nix fmt flake.nix -- --c",
|
||||||
"syncpack:fix": "syncpack list-mismatches || (syncpack fix-mismatches && pnpm i)",
|
"syncpack:fix": "syncpack list-mismatches || (syncpack fix-mismatches && pnpm i)",
|
||||||
"syncpack:check": "syncpack list-mismatches",
|
"syncpack:check": "syncpack list-mismatches",
|
||||||
"jscpd:check": "cross-env NODE_OPTIONS=--max-old-space-size=8192 jscpd --config .jscpd.json",
|
"jscpd:check": "cross-env NODE_OPTIONS=--max-old-space-size=8192 jscpd --config .jscpd.json",
|
||||||
|
|||||||
10
turbo.jsonc
10
turbo.jsonc
@@ -30,8 +30,14 @@
|
|||||||
},
|
},
|
||||||
"clean": { "cache": false, "dependsOn": ["^clean"] },
|
"clean": { "cache": false, "dependsOn": ["^clean"] },
|
||||||
// Root tasks overrides
|
// Root tasks overrides
|
||||||
"//#fmt:root": {},
|
"//#fmt:root": {
|
||||||
"//#fmt:check:root": {},
|
"with": ["fmt:root:nix"],
|
||||||
|
},
|
||||||
|
"//#fmt:root:nix": {},
|
||||||
|
"//#fmt:check:root:nix": {},
|
||||||
|
"//#fmt:check:root": {
|
||||||
|
"with": ["fmt:check:root:nix"],
|
||||||
|
},
|
||||||
"//#lint:root": {
|
"//#lint:root": {
|
||||||
"dependsOn": ["fmt:root"],
|
"dependsOn": ["fmt:root"],
|
||||||
"with": [
|
"with": [
|
||||||
|
|||||||
Reference in New Issue
Block a user