From 8edebc80d6196f41f1c9d1ee18d8d25e9ec941f8 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 22 Jul 2020 17:22:39 -0500 Subject: [PATCH 1/3] kube3d 1.7.0 -> 3.0.0 --- .../networking/cluster/kube3d/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/cluster/kube3d/default.nix b/pkgs/applications/networking/cluster/kube3d/default.nix index c6ae0629d7c..cf60bd65ecd 100644 --- a/pkgs/applications/networking/cluster/kube3d/default.nix +++ b/pkgs/applications/networking/cluster/kube3d/default.nix @@ -2,23 +2,24 @@ buildGoModule rec { pname = "kube3d"; - version = "1.7.0"; - k3sVersion = "1.17.3-k3s1"; + version = "3.0.0"; + k3sVersion = "1.18.6-k3s1"; goPackagePath = "github.com/rancher/k3d"; + excludedPackages = ''tools''; src = fetchFromGitHub { owner = "rancher"; repo = "k3d"; rev = "v${version}"; - sha256 = "0aij2l7zmg4cxbw7pwf7ddc64di25hpjvbmp1madhz9q28rwfa9w"; + sha256 = "1p4rqzi67cr8vf1ih7zqxkpssqq0vy4pb5crvkxbbf5ad5mwrjri"; }; buildFlagsArray = '' -ldflags= -w -s - -X github.com/rancher/k3d/version.Version=${version} - -X github.com/rancher/k3d/version.K3sVersion=v${k3sVersion} + -X github.com/rancher/k3d/v3/version.Version=${version} + -X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion} ''; vendorSha256 = null; From 7f8171b2b6eebb934d6bbb6c43ff94d5fc037b40 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 22 Jul 2020 20:03:06 -0500 Subject: [PATCH 2/3] kub3d: add shell completions --- .../applications/networking/cluster/kube3d/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/kube3d/default.nix b/pkgs/applications/networking/cluster/kube3d/default.nix index cf60bd65ecd..fa4d9e2a268 100644 --- a/pkgs/applications/networking/cluster/kube3d/default.nix +++ b/pkgs/applications/networking/cluster/kube3d/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "kube3d"; @@ -22,6 +22,14 @@ buildGoModule rec { -X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion} ''; + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' + for shell in bash zsh; do + $out/bin/k3d completion $shell > k3d.$shell + installShellCompletion k3d.$shell + done + ''; + vendorSha256 = null; meta = with stdenv.lib; { From 850d2844e59988a63446d24443f652ea01f79b67 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 22 Jul 2020 20:15:05 -0500 Subject: [PATCH 3/3] kube3d: fix verion prefix tu pull correct image docker pull rancher/k3d-proxy:3.0.0 Error response from daemon: manifest for rancher/k3d-proxy:3.0.0 not found: manifest unknown: manifest unknown vs docker pull rancher/k3d-proxy:v3.0.0 v3.0.0: Pulling from rancher/k3d-proxy The version tag selects the image tag. --- pkgs/applications/networking/cluster/kube3d/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/kube3d/default.nix b/pkgs/applications/networking/cluster/kube3d/default.nix index fa4d9e2a268..a65ac2ec98b 100644 --- a/pkgs/applications/networking/cluster/kube3d/default.nix +++ b/pkgs/applications/networking/cluster/kube3d/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { buildFlagsArray = '' -ldflags= -w -s - -X github.com/rancher/k3d/v3/version.Version=${version} + -X github.com/rancher/k3d/v3/version.Version=v${version} -X github.com/rancher/k3d/v3/version.K3sVersion=v${k3sVersion} '';