Bix
A Nix-based devShell for building Bitcoin Core
Install / Use
/learn @bitcoin-dev-tools/BixREADME
Bix - Bitcoin Development Environment
Overview
This flake is designed primarily as a devShell rather than for building a specific derivation. It provides:
- All dependencies from nixpkgs needed to build all Bitcoin Core modules
- Modern LLVM toolchain
- Cross-platform support (Linux and MacOS x64 + aarch64)
Features
Build System
We use a slightly opinionated Clang/LLVM-based build system:
- CMake + Ninja - Fast, parallel builds
- LLVM/Clang 20 toolchain
- ccache
Dependencies
All Bitcoin Core dependencies from nixpkgs:
- Boost
- libevent
- SQLite
- ZeroMQ
- Cap'n Proto
- QR code generation
Development Tools
- Debugging: GDB (Linux) / LLDB (macOS)
- Tracing: SystemTap, BCC, bpftrace (Linux)
- Linting: flake8, mypy, vulture, codespell
- Misc:
clang-format,clang-tidyand friends
Build Capabilities
- All Bitcoin Core modules from nixpkgs dependencies (Linux)
- On MacOS the USDT component is not possible to build
- All modules excluding QT using depends
Usage
Enter Development Shell
nix develop
Build Bitcoin Core
Once in the development shell, you can build Bitcoin Core using either approach:
Using nixpkgs dependencies
cmake -B build
# On Linux build all modules with:
# cmake -B build --preset dev-mode
cmake --build build -j$(nproc)
Using depends system (excludes GUI)
TRIPLET=$(./depends/config.guess)
make -C depends -j$(nproc) NO_QT=1
cmake -B build --toolchain depends/"$TRIPLET"/toolchain.cmake
cmake --build build -j$(nproc)
Quick Test with Docker
To quickly test the development environment using Docker:
docker run --pull=always -it nixos/nix
git clone --depth=1 https://github.com/bitcoin/bitcoin && cd bitcoin
nix develop github:bitcoin-dev-tools/bix --extra-experimental-features flakes --extra-experimental-features nix-command --no-write-lock-file
cmake -B build
cmake --build build -j$(nproc)
Platform Support
| Platform | Architecture | Build | Tracing | |----------|--------------|-------|---------| | Linux | x86_64 | ✅ | ✅ | | Linux | aarch64 | ✅ | ✅ | | MacOS | x86_64 | ✅ | ❌ | | MacOS | aarch64 | ✅ | ❌ |
Environment Variables
The shell automatically sets:
CMAKE_GENERATOR=Ninja- Use Ninja build systemLD_LIBRARY_PATH- Includes Cap'n Proto librariesLOCALE_ARCHIVE- Proper locale support (Linux)
Requirements
- Nix with flakes enabled
Contributing
This flake uses nixpkgs stable (25.05) for reproducible builds. Format code with:
nix fmt .
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
