Rethinking package management
#nixos
Rok Garbas, @garbas
pycon ireland 2016
Me:
- live in berlin
- work at mozilla (releng)
- I don't drink beer
- I don't use a phone
- I don't like current state of package management
Agenda
- (Nix) terminology in a slide
- What problems Nix solve
- Bonus: Nix + Python
- Why is PM still a problem?
- Bonus: Nix + Docker
- Bonus: What is NixOS?
Problems with PM
Upgrade problem (dependency hell)
Reproducibility
Too many tools
NixOS
Nix Expression language
nixpkgs
nixops
Nix
Hydra
Reproducibility
Deterministic
Referentially transparent
Pure
Stateless
def add(a, b):
return a + b
add(1, 2)
def add(a, b):
if is_monday():
return None
else:
return a + b
assert add(1, 2) == 3
# above fails on mondays
Atomic
Works on my machine
Rollbacks
Multiple envs
Source / Binary
Installing Nix
curl https://nixos.org/nix/install | sh
Uninstalling Nix
rm -rf /nix
Demo time
NixOS Community
~500 services
~900 contributors
~11k packages
~13k pull requests / ~4k issues
Caveats of Nix/NixOS
quick "hacks" are hard/impossible
documentation is good but not beginner friendly
steeper learning curve
disk space
no management of application state
Thank you
Questions?
@garbas
NixOS Meetup in Dublin
http://www.meetup.com/NixOS-Dublin
Rethinking package management
By Rok Garbas
Rethinking package management
- 1,899