devbox icon indicating copy to clipboard operation
devbox copied to clipboard

the nixPkgs.commit property of devbox.json is not documented

Open michi-zuri opened this issue 1 year ago • 2 comments

What happened?

I couldn't find a description of the nixPkgs.commit configuration in the documentation. Is that option deprecated?

Steps to reproduce

No response

Command

No response

devbox.json

No response

Devbox version

0.10.6

Nix version

No response

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response

michi-zuri avatar May 17 '24 19:05 michi-zuri

Yes, this field is now deprecated since you can specify the version of a package that you want directly (e.g., devbox add [email protected])

Lagoja avatar May 17 '24 19:05 Lagoja

Hi @Lagoja

thank you for the rapid response! And thank you so much for you contributions to devbox, it's a really wonderful tool that solves so many problems and prevents so many headaches!

What I'm going to describe is just some minor trouble that I had in my first hours of using devbox, but which I would probably have experienced also in nix as well (I think I had this problem with nix but couldn't figure out what the problem was, so just made sure to stick with the stable channel).

I recently read this inspiring blog post on using devbox with Elm and it appears that the unstable build of elmPackages.elm is failing recently, so devbox add elmPackages.elm cannot fetch the binary from cache, instead tries to build locally and fails.

The version of Elm I'm trying to install is actually the same version in the unstable channel as in the stable 23.11 channel (0.19.1). The only difference is, that in the unstable channel the binary fails to build, which is to be expected sometimes of unstable channels if I'm not mistaken.

The implications of this previously described Apple silicon specific issue are:

This command works currently: devbox add github:NixOS/nixpkgs/23.11#elmPackages.elm and install elm version 0.19.1 but these commands fail: devbox add elmPackages.elm devbox add [email protected]

So, I wondered, if it's possible to pin my devbox json to a specific channel, other than unstable. and thought that nixPkgs.commit would be a possibility, although I'd prefer the ergonomics of the proposed solution in #404. To be clear, the issue is not needing a specific version, but getting a build from a stable channel, to make installing devbox.json files from legacy projects more reliable.

So I'm thinking about requesting reopening #404. What are your thoughts on that?

atb Michael

michi-zuri avatar May 18 '24 19:05 michi-zuri