Nix & Reproducibility
“It works on my machine, but fails in CI.” To solve this classic problem, Aether Platform leverages Nix.
The “Works on My Machine” Problem
Traditional Dockerfile-based approaches have limits.
Running apt-get update at different times can install different package versions, and base image updates can introduce breaking changes silently.
Why Nix?
Nix is a purely functional package manager.
Aether’s workspace definition file (dev.nix) guarantees:
- Declarative: Explicitly define tools and versions.
- Immutable: Once built, the environment is frozen with cryptographic hashes of all dependencies.
- Isolated: No dependency conflicts. You can safely coexist Python 3.8 and 3.11.
dev.nix Configuration
Simply place dev.nix in your project root, and Aether builds the environment automatically.
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell { packages = [ pkgs.python311 pkgs.nodejs_20 pkgs.poetry pkgs.ripgrep ];
shellHook = '' echo "Welcome to Aether Environment!" poetry install '';}Binary Caching Strategy
While Nix builds can be compute-intensive, Aether solves this:
- Global Cache: Common packages (Node.js, Python, Rust) are served instantly as binaries from Aether’s global cache.
- Project Cache: Project-specific builds are also cached and shared among team members and CI. This dramatically speeds up
npm installorcargo build.