Commit 5d2b0d4a authored by Robert Rose's avatar Robert Rose
Browse files

k3s: set meta.position to respective version file

Formerly, meta.position used the default, i.e. getting the position
of `meta.description`, which resulted in all k3s versions setting
`meta.position` to the generic builder script
(pkgs/applications/networking/cluster/k3s/builder.nix). This had the
effect that `nixpkgs-update` couldn't find the derivation files and
automatic updates failed for all k3s versions. This commit explicitly
sets `meta.position` to the position of the `k3sVersion` attribute, which
points to the version file of the respective version (e.g.
pkgs/applications/networking/cluster/k3s/1_31/versions.nix). This solves
problems during automatic updates and provides version-specific
information in `meta.position`.
parent ab0bdd52
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ lib:
  # run `grep github.com/kubernetes-sigs/cri-tools go.mod | head -n1 | awk '{print $4}'` in the k3s repo at the tag
  criCtlVersion,
  updateScript ? null,
}:
}@attrs:

# builder.nix contains a "builder" expression that, given k3s version and hash
# variables, creates a package for that version.
@@ -325,6 +325,7 @@ in
buildGoModule rec {
  pname = "k3s";
  version = k3sVersion;
  pos = builtins.unsafeGetAttrPos "k3sVersion" attrs;

  tags = [
    "libsqlite3"