This PR also reworks the packaging of k3s significantly.
Notably, it makes the following changes:
1. buildGoModule instead of buildGoPackage + mkDerivation (for the final one)
2. Merges the final two derivations (k3s user binary + wrapper script stuff) into one
3. Reduces the amount of patching & usage of upstream packaging scripts
And of course updates to 1.23
I'm not really sure yet if this is significantly better than the
previous packaging model, but it at least seems a little nicer I guess?
buildGoModule is nice, even if we have to hack around it quite a bit to
get a 'go generate' in there.
Notably, this includes support for unified cgroups in k3s, which is
especially convenient given nixos has moved to them.
Fixes (at least partly) #111835
The upstream project already builds and releases for aarch64. This makes
the couple small tweaks that I found necessary for k3s to cross-compile
for aarch64.
I also ran it through nixpkgs-fmt.
This packages k3s as a single self-contained binary (as upstream k3s
does), but without having to download any impure already-built binaries.
The upstream packaging scripts are used. Due to k3s's rather complicated
packaging arrangement, this ends up being a rather long derivation.