labs/tidepool/src/lib
Austreelis b67847e7eb fix: Correctly resolve packages from preferences.packages.version (#33)
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>
2025-10-04 00:40:05 +00:00
..
default.nix feat: add lib.fetchurl function (#27) 2025-10-01 05:20:06 +00:00
fetchurl.nix feat: add lib.fetchurl function (#27) 2025-10-01 05:20:06 +00:00
options.nix refactor(format): apply formatting 2024-07-07 15:03:48 -07:00
packages.nix fix: Correctly resolve packages from preferences.packages.version (#33) 2025-10-04 00:40:05 +00:00
platforms.nix refactor: default host and target platforms based on build 2025-09-19 21:03:13 -07:00
systems.nix feat: add support for platform specs (#15) 2025-09-10 12:32:11 +00:00
types.nix fix: Correctly resolve packages from preferences.packages.version (#33) 2025-10-04 00:40:05 +00:00