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

Why would I give up on shell.nix if flakes API isn't stable yet? I've got my own patterns around default.nix and shell.nix that provide better ergonomics than flakes.



Flakes have a lock file (flake.lock) which means you get to decide explicitly when to update the software. nixpkgs does not have precise rules on what updates are allowed, so nix-shell can give surprising results unless you make the effort to stick to one version of the whole nixpkgs explicitly. With flakes you can combine packages and versions explicitly.


> you make the effort to stick to one version of the whole nixpkgs explicitly.

the "effort" is just pointing to a particular checkout from nixpkgs repo

> With flakes you can combine packages and versions explicitly.

it's the same thing with default.nix/shell.nix, just having a separate lockfile changes nothing in the underlying `builtins.fetchGit` / `builtins.fetchTarball`


For your personal use, it sounds like it won't make sense.

In a team setting, enforcing that everyone has to follow purity best practices because nothing else is allowed is great.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: