NixCon 2025

Nix Ninja – Incremental builds using dynamic derivations
2025-09-06 , Aula (4.101)

Nix builds packages from sources as monolithic units – if you change one source file, Nix rebuilds the entire package from scratch. We open-sourced nix-ninja which leverages the experimental “dynamic derivations” feature to bring compilation-unit level granularity to Nix builds.

We target ninja build files, a common format for describing build graphs used by popular build systems like CMake and meson. This means existing CMake/meson projects can use nix-ninja in place of a regular ninja binary to incrementally build using Nix as a backend.

Nix-ninja can compile CppNix today, but we’re still very early in development. I’d like to quickly introduce the project and inspire more interest in dynamic derivations.


Link to slides: Link to slides