Hacker News new | ask | show | jobs
by amelius 1531 days ago
This is how I use Conda, which uses libsolv under the hood to figure out compatible versions.

This makes me wonder: does Nix use libsolv, or a similar idea?

1 comments

Nix wouldn't.

Roughly, Nix's approach is to describe packages as a function of it dependencies as inputs. (And all the inputs have all their dependencies described in Nix, too). Nix doesn't do things like "install latest version of X". (One of Nix's principles is build reproducibility; the package should have the same behaviour if built with the same input).

Tools like mach-nix or poetry2nix wrap around nix.. as I understand, they adapt the requirements.txt or whatever and pass it into Nix in a way that Nix can understand.