This project now includes Nix flake infrastructure for reproducible builds.
- flake.nix - Nix flake configuration defining dev shell, build packages, and checks
- flake.lock - Lock file ensuring reproducible dependency resolution
- .gitmodules - Git submodules configuration for GitHub Actions and tools
- Makefile - Convenient Make targets for building with Nix
# Clone git submodules
git submodule update --init --recursive
# Enter development shell (with all dependencies)
nix develop# Build everything
make all
# Build Rust backend
make rust
# Build frontend
make frontend
# Clean build artifacts
make clean
# Enter development shell
make shell- Rust: Latest stable Rust with rust-analyzer, clippy, rustfmt
- WASM: wasm32-unknown-unknown target, trunk, wasm-bindgen-cli
- Node/Bun: bun and nodejs_22 for frontend development
- Solidity: Foundry (forge, cast, anvil) via ethereum.nix
- Native Deps: pkg-config, OpenSSL, LMDB
- Pre-commit hooks: rustfmt and nixpkgs-fmt checks
Inside nix develop:
OPENSSL_DIR- Points to OpenSSL dev filesOPENSSL_LIB_DIR- Points to OpenSSL libraries
The following are git submodules from meta-introspector:
nix/ethereum.nix- Foundry toolchainnix/xrust- XSLT engine (Rust)nix/actions/*- GitHub Actions forks
nix build .#frontend- Build frontend (dist/)nix build .#backend- Build backend binarynix build .#default- Build default (backend)
The flake includes git hooks for:
- rustfmt (check formatting on commit)
- nixpkgs-fmt (check Nix file formatting)
Enable them with:
pre-commit install --hook-type commit-msg- The Nix infrastructure provides complete isolation from system dependencies
- All builds are reproducible across different machines
- The
flake.lockfile ensures everyone uses the exact same dependency versions