Fixes#101734
Prior to this change, the k3s binary included a tarball containing
binaries like 'kubectl', but didn't keep a runtime reference to those
runtime dependencies in plaintext (since they were gzipped inside the
single combined k3s binary).
In order for nix's automatic runtime dependency detection to work, we
need to have a reference to them somewhere in $out.
propagatedBuildInputs seems to do the right thing for us here.
Running `nix-store -q --tree /nix/store/path/to/k3s` produces a
different output after this change which includes the `libseccomp`
reference I expect.
Otherwise we get warnings like 'level=warning msg="failed to start
br_netfilter module"' in k3s's logs.
Adding modprobe to k3s's PATH fixes the warning at least. I'm not
certain if it fixes any real issue or not.
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.