Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s: init at 1.0.0 #75507

Closed
wants to merge 1 commit into from
Closed

k3s: init at 1.0.0 #75507

wants to merge 1 commit into from

Conversation

offlinehacker
Copy link
Contributor

Motivation for this change

Package k3s. I was not able to build it from source, as there are too many variables, and would probably need to fork a source, but statically linked binaries work just fine.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mbrgm
Copy link
Member

mbrgm commented Jan 3, 2020

LGTM, also tested running this on NixOS. As you said, it's unfortunate that the upstream build process is as impure (downloading lots of stuff via curl).

@ngerstle
Copy link
Contributor

ngerstle commented Mar 1, 2020

I've been running using an updated version on x86_64 for a bit now, no difficulties but still impure (and only pulling one arch):

    pname = "k3s";
    version = "1.17.2+k3s1";
  
    src =  fetchurl {
      url = "https://github.com/rancher/k3s/releases/download/v${version}/k3s";
      sha256 = "0zxkw7daq3v8j2x7dwxadc1rjxy2d2sn63acpfakpwx874kxrdrv";
    };
  
    preferLocalBuild = true;
    dontUnpack = true;
    installPhase = "install -Dm755 $src $out/bin/k3s";

Can we get this PR either updated & merged, or merged & update in a separate PR?

@euank
Copy link
Member

euank commented Apr 9, 2020

Hey, I've managed to get a pure (I think) k3s derivation written (and merged too!).

I'm hopeful that I've got it building correctly so it can replace patchelfing the upstream binary. If you want to either improve the derivation or use it and make sure I didn't mess anything up, both of those things would be appreciated!

@offlinehacker
Copy link
Contributor Author

@euank great to hear, I am closing this one then 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants