Commit 4042151
authored
[nixpkgs version] change field from version to commit; add validation (#256)
## Summary
Changing the field name inside `Config.Nixpkgs` from `version` to
`commit`.
The motivation stems from the realization that even `YY.MM` stable
channels of
nixpkgs have periodic updates (mostly for security), which means the
commit-hash
tracked by the `nixos-stable` branch changes.
To simplify the product design for now, and to avoid introducing a
lockfile,
we change `version` to be the unambiguous `commit`. For users who would
like
to track the nixpkgs commit from `search.nixos.org` webpage, they can
refer
to `status.nixos.org` and use the commit for the nixpkgs channel they
want.
## How was it tested?
`go test ./...` b/c added a testcase for the validation function.
```
> cd testdata/nodejs/nodejs-18
> 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
```1 parent 9a50fac commit 4042151
2 files changed
+72
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
64 | 75 | | |
65 | | - | |
| 76 | + | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
273 | 284 | | |
274 | 285 | | |
275 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
0 commit comments