Skip to content

Nix Pills - Chapter 1 - Why You Should Give it a Try⚓︎

Nix is a purely functional package manager and deployment system for POSIX.

Most, if not all, widely used package managers (dpkgrpm, …) mutate the global state of the system. If a package foo-1.0 installs a program to /usr/bin/foo, you cannot install foo-1.1 as well, unless you change the installation paths or the binary name. Changing the binary name means breaking users of that binary.

Debian, for example, partially solves the problem with the alternatives system.

Derivations/packages are stored in the Nix store as follows: /nix/store/<hash>-<name>.

Since Nix derivations are immutable, upgrading a library like glibc means recompiling all applications, because the glibc path to the Nix store has been hardcoded.