You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[nixpkgs version] generate nix files containing the nixpkgs version from config (#258)
## Summary
This PR will parameterize the `shell.nix`, `development.nix` and
`runtime.nix` files
to accept a `NixpkgsInfo` struct comprising of `url` and `sha256`
fields.
To pass the `NixPkgsInfo` struct to these templates, we need to add them
to the `ShellPlan`
and `BuildPlan` structs. I don't like this, but it seemed the most
straightforward
approach.
## How was it tested?
with the hardcoded commit hash
```
➜ DEVBOX_FEATURE_NIXPKG_VERSION=1 DEVBOX_DEBUG=0 devbox shell -- node --version
Installing nix packages. This may take a while...done.
Starting a devbox shell...
v18.7.0
```
From https://status.nixos.org, I got the most recent commit for the
`nixos-22.05` channel:
`b3a8f7ed267e0a7ed100eb7d716c9137ff120fe3`. I set this in the
devbox.json file.
```
> DEVBOX_FEATURE_NIXPKG_VERSION=1 DEVBOX_DEBUG=0 devbox shell -- node --version
Installing nix packages. This may take a while...done.
Starting a devbox shell...
v18.9.1
```
This matches the version seen in https://search.nixos.org
```
> DEVBOX_FEATURE_NIXPKG_VERSION=1 devbox build && docker run devbox
.... // omitted
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
the NODE_MAJOR_VERSION is 18
```
0 commit comments