Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by mrath on Tuesday December 20, 2022 @09:48PM
(#34076106)
Is there a way to pin a version of the tool with this? For me, the biggest problem with Nix is that version pinning is not easy, actually it is complex.
[ Parent
| on HN ]
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by jljljl on Tuesday December 20, 2022 @09:58PM
(#34076141)
Hello! When you add packages with Devbox add, we automatically pin your devbox.json to a specific commit in the Nix store. This ensures that any developer who uses your devbox.json will get the same packages that you do.
You can read more about how it works here:
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by mrath on Tuesday December 20, 2022 @11:59PM
(#34076846)
I guess that only pins tools by nixpkgs version, or does it have capability to pin by exact version of tools like say go 1.18, pg 12, node 16 etc?
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by SuperSandro2000 on Wednesday December 21, 2022 @11:42AM
(#34082963)
No, because older software versions are dropped often rather quickly, especially if they are not maintained by upstream anymore, to reduce required maintaince work on them.
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by flylikeabanana on Tuesday December 20, 2022 @09:50PM
(#34076114)
Pinning is first-class with the new flake method. When you create a flake, a corresponding flake.lock is created, similar to lock files in other languages. There's even a dedicated command now to upgrade the dependencies declared in a flake.
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by mrath on Tuesday December 20, 2022 @09:59PM
(#34076148)
Yes, I think I get that. But it is not easy to pin on different packages. For example if I want golang 1.18, node 12, I need to find the commit corresponding to those and add them. I mean it is possible but not as easy as it should be.
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by Smaug123 on Wednesday December 21, 2022 @06:58AM
(#34079507)
There's often a bunch of different versions in nixpkgs. For example, postgres currently has 11 through 15 available (https://github.com/NixOS/nixpkgs/blob/e7f345ca81f4f5513c4e73...). Nodejs has 14, 16, 18, and 19 (https://github.com/NixOS/nixpkgs/blob/e7f345ca81f4f5513c4e73...).
Re:Devbox 0.2.0: Automatic Nix Installer, Plugins, and Backg...
by thomastjeffery on Wednesday December 21, 2022 @10:48PM
(#34089554)
Finding a way to install a specific version - not git commit or git tag, version - of a package is the problem.
https://github.com/NixOS/nixpkgs/issues/93327
Nix before flakes used channels, each with a flat global namespace. Flakes are intended to sit inside the git repo, so that's even less discoverable.
Nix solves practically every technical problem, but has terrible UX and documentation.