Before this, a value that does not correspond to an attribute under a
package alias' `versions` would make it default to the latest as defined
by `lib.packages.getLatest`, which isn't a silver bullt: it choose
"bash5.2.15-bootstrap" for instance instead of stage1-passthrough (and I
don;t think we have an easy fix for that).
Given values like `"1.2.3"` makes little sense in
`config.preferences.packages.version` (because it's a package-set-wide
preference), this means it was hardly ever useful.
before:
```console
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "latest";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "stable";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
```
after:
```console
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "latest";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-stage1-passthrough"
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "stable";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
```
Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #33
Reviewed-by: Ruby Iris Juric <ruby+auxolotl@srxl.me>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
|
||
|---|---|---|
| .. | ||
| builders | ||
| lib | ||
| mirrors | ||
| packages | ||