Hacker News new | past | comments | ask | show | jobs | submit login

Here's a use case I pose every time Nix comes up in these discussions.

For $REASONS I want python 3.7.10, and the full scientific stack (numpy, scipy, pandas, numba, matplotlib, ...) at the latest compatible versions along with pytorch. I don't mind waiting for things to compile. How, if at all, can Nix help me get into an environment that meets those constraints? Can it help without requiring me to find and copy hashes of things?




> requiring me to find and copy hashes of things

Put an incorrect hash in. Run the build. The error will tell you what hash it actually got. Copy that. Run build again.



I have a similar question and want to ask the nix crowd about an approach - how well does it work to have nix just manage the nativeish stuff like Python and maybe the compiler chain, but still use the language's package manager (pip/poetry) for language deps ?

Both for parent's quandary, and for when you're working with a group and don't want to force everyone else to use Nix.


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?


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: