2 ms·
I don’t get it, what’s the difference between nix and other dependency or package managers?
by interactivecode 5y ago
I don’t get it, what’s the difference between nix and other dependency or package managers?
- rgoulter 5y agoNix does more things than other package managers. Compared to other package managers: You could use Nix to install packages, in the same way you would with other package managers. An advantage to this is you'll get the same version of the package regardless of which distribution you use. (Whereas with, say, Ubuntu you might need to add a PPA to get versions as bleeding-edge as what Arch would offer). Nix's tooling is also broader in scope: e.g. with nix-shell, you can have a shell which has a Go-lang compiler (or whatever) in that shell, but without needing the Go-lang compiler installed on the computer. This is comparable to e.g. asdf, or to running your toolchain in a Docker container (like what VSCode Remote Containers offers). -- i.e. Nix can be useful for development. NixOS takes the same Nix declarative language, and allows describing the configuration of the whole OS setup with it. Just as Terraform declares an orchestration of cloud infrastructure, NixOS allows declaring how the OS is setup. (Here, Nix is comparable to e.g. cloud-init or Ansible). -- i.e. Nix can be useful for deployment.
- ghostwriter 5y agoNix as a package manager is a subset of a broader concept of a graph database of reproducible build instructions that explicitly track every dependency of your project, and a set of tools that allow you to build and cache said dependencies in an isolated, distributed (parallel), and transparent way. Add filesystem- / path-sandboxing to the equation and you'll get a set of features that make Nix different to other conventional package managers.