Nix
Nix is a purely functional package manager and build system that makes builds reproducible and deployments reliable by treating every package as an immutable, uniquely identified artifact derived from its exact inputs.
Definition
Nix is a purely functional package manager and build system that makes builds reproducible and deployments reliable by treating every package as an immutable, uniquely identified artifact derived from its exact inputs.
Overview
Eelco Dolstra created Nix as part of his PhD research at Utrecht University, published around 2006, with the goal of solving long-standing problems in software deployment—like conflicting shared libraries and "works on my machine" inconsistencies—by applying ideas from functional programming to package management. In Nix, every package is built as a "derivation": a pure function of its exact source code, build instructions, and dependencies, with the result stored in a content-addressed path under /nix/store. Because the path depends on a hash of all its inputs, two different versions, or even two different builds, of the same package can coexist on the same system without conflicting, and rebuilding from the same inputs always produces the same output. This foundation underpins NixOS, a Linux distribution where the entire system configuration is described declaratively and can be rolled back atomically, as well as Nix Flakes, a mechanism for pinning and sharing reproducible project environments. It's popular with teams that want Docker-like reproducibility for development environments and CI, sometimes as a complement to tools like Terraform for describing infrastructure declaratively, or Ansible for configuration management.
Key Features
- Purely functional package management where builds are pure functions of their inputs
- Content-addressed store allowing multiple package versions to coexist without conflict
- Fully reproducible builds given the same inputs
- Declarative system configuration via NixOS
- Atomic upgrades and rollbacks of entire system configurations
- Nix Flakes for pinning and sharing reproducible project environments
- Cross-platform support across Linux and macOS, beyond just NixOS