Re:Nix-Powered Development with OCaml
by ghostwriter on Monday March 06, 2023 @06:32AM
(#35039809)
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.
[ Parent
| on HN ]
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.
Re:Nix-Powered Development with OCaml
by ghostwriter on Monday March 06, 2023 @07:10AM
(#35040087)
> 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`
Re:Nix-Powered Development with OCaml
by ParetoOptimal on Monday March 06, 2023 @11:20AM
(#35042837)
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.