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 like it is wonderful when it works, but it might occasionally be a crusade. The pills are a series of essays in how the system works.
- Luc Perkins, From Homebrew to Home Manager documents…
- nix-community/home-manager: Manage a user environment using Nix
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
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 …
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.
Designed for python, but somewhat generic. I am not a massive fan of this in practice; it has seemed a little glitchy.
Generic dependency managers
You want to have specific versions of the supporting libraries for specific purposes. This is extremely common, and systems exits 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.
That is an emphatic kind of package/version management, I suppose. See containerization.