by BiteCode_dev · 5y ago · 0 comments
Nix is pretty much incompatible with everything, because our entire legacy of software stack has state, and we need to accommodate for it.
So we keep adding those hacks because we favor compat above purity.
Even nix has to, after all, there plenty of bash calls in NixOS config scripts as soon as you do something non trivial.
If 'apt-get dist-upgrade' is breaking the packages we pip-installed into /usr/local, I'd ask (a) why we're using two package managers, and (b) why 'put these files in these locations' is being solved implicitly by running imperative, non-deterministic commands to mutate things in-place, rather than e.g. extracting a .tar.gz of known-good dependencies.
debian packagers won't use pip for obvious reasons. dev need pip because it's portable, and doesn't need packagers validation.
It would have been better if something like nix would have been adopted 30 years ago by both community, but it hasn't been so we have several packages managers. It's even worst now with poetry, conda, snap, flatpack and docker.
> why 'put these files in these locations' is being solved implicitly by running imperative, non-deterministic commands to mutate things in-place, rather than e.g. extracting a .tar.gz of known-good dependencies.
pip now uses wheels, and basically does that. Whl files are zip, and pip just unpack it at a know location. The problem is, this location is currently shared with the OS if you don't use --user or a venv. This article address that problems. My other comment also talk about some other solution.
It's very hacky, because, well legacy and all that.
Nix solves this problem in multiple different ways. One of which is packaging, but also the entire /nix/store is mounted read-only.
A sudo pip install would have no ability to break the system or remove something that was installed by nix.
Immutable works only if the entire chain is.