Software package managers

June 15, 2019 — January 19, 2022

computers are awful
premature optimization

Before the current trend to distribute containerized and/or sandboxed apps, our platform maintainers figured out how to install dependencies and such via package managers.

Figure 1

Installing necessities?

1 Homebrew

See homebrew.

1.1 Whalebrew

Containerized command installation inspired by homebrew. See whalebrew

2 Nix

The Nixos dependency/build system works by isolating dependencies, accomplishing many of the same things in its own elegant way; somewhere between a version manager and a package manager.

It is a packaging system that builds unique combinations of dependencies for particular software in a functional language style (i.e. no side-effects). Works on Linux or OSX. Nixos is a whole Linux distribution built on it, which sounds wonderful when it works, but it might occasionally be a crusade. The pills are a series of essays on how the system works.

In their words:

Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built. Nix stores packages in the Nix store, usually the directory /nix/store, where each package has its own unique subdirectory such as /nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/. where b6gvzjyb2pg0… is a unique identifier for the package that captures all its dependencies (it’s a cryptographic hash of the package’s build dependency graph). This enables many powerful features:

Multiple versions, Complete dependencies, Multi-user support, Garbage collection …

3 Chocolatey

A Windows choice seems to be Chocolatey. I’ve found no use for it yet since everything I’ve needed so far seems to be in the Linux ecosystem. But your mileage will surely vary.

4 Macports

TBD

5 Conda

Designed for Python, but somewhat generic. I am not a massive fan of this in practice; it has seemed a little glitchy.

6 Generic dependency managers

You want to have specific versions of the supporting libraries for specific purposes. This is extremely common, and systems exist to do it. NB that Nix, above, does this automatically. Homebrew can be made to do it with careful configuration — possibly dotenv would help do it better. See dependency management.

7 Containerize everything

That is an emphatic kind of package/version management, I suppose. See containerization.

8 AUR

TBD