DevConf.CZ

Learning from Nix: how other package managers can do better
2024-06-13 , E112 (capacity 156)

Nix is a powerful build system and package manager that enables declarative builds and deployments. This talk is about a couple of Nix's key strengths and how traditional package managers like DNF can (or can't) evolve to achieve some of the things Nix does.

I'll discuss three advantages of Nix:

  1. Determinism: Nix can set up identical development/build/runtime environments anywhere, so software runs the same on developer workstations, on the CI, and in production.

  2. Customizability: With Nix, there's no separation between the package manager and the build system, so it's easy to patch dependencies to suit your needs, for example to add a compiler flag or change the source repository out for a fork.

  3. Isolation: There's no issue installing multiple versions of a program or library on the same system, since Nix stores each package in a separate filesystem tree.

Traditional "imperative" package managers (APT, DNF, pacman) and even container tools (Docker, Podman) fall short of these goals (reproducible Docker builds are not straightforward!). But with a few changes, we can get closer.

This talk is intended for people who have experience packaging software and/or building containers. Familiarity with Nix is great but is not required; there will be plenty of Nix demonstrations!

Bonus: building Docker images with Nix!

See also:

Free software developer from Atlanta, USA. Currently working on DNF 5 (professionally) and Drasl (unprofessionally).