From 58ba20dd90fbd48b12f66a4863f11da71870cfa8 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 19 May 2020 09:15:47 +0000 Subject: [PATCH 1/3] kubie: 0.8.4 -> 0.9.1 --- pkgs/development/tools/kubie/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/kubie/default.nix b/pkgs/development/tools/kubie/default.nix index de45ff50c030..c8985fc063f1 100644 --- a/pkgs/development/tools/kubie/default.nix +++ b/pkgs/development/tools/kubie/default.nix @@ -4,16 +4,16 @@ with rustPlatform; buildRustPackage rec { pname = "kubie"; - version = "0.8.4"; + version = "0.9.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "sbstp"; repo = "kubie"; - sha256 = "1f82xlhhxbjadjw609kr1kdm4n69c9mqjia4b3k505wjh7cc55n0"; + sha256 = "0q1dxry10iaf7zx6vyr0da4ihqx7l8dlyhlqm8qqfz913h2wam8c"; }; - cargoSha256 = "0mish7wqwq5ynl98n6swdn5i6mg62aih5rfykbl3wx39b468n481"; + cargoSha256 = "13zs2xz3s4732zxsimg7b22d9707ln4gpscznxi13cjkf5as9gbz"; installPhase = '' mkdir -p $out/share/bash-completion/completions From d890ac8973e8147eae1773778041883d2cd5d56d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 19 May 2020 04:20:00 -0500 Subject: [PATCH 2/3] kubie: use installShellFiles --- pkgs/development/tools/kubie/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/kubie/default.nix b/pkgs/development/tools/kubie/default.nix index c8985fc063f1..bdb8f0ea1479 100644 --- a/pkgs/development/tools/kubie/default.nix +++ b/pkgs/development/tools/kubie/default.nix @@ -1,8 +1,6 @@ -{ stdenv, rustPlatform, fetchFromGitHub }: +{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles }: -with rustPlatform; - -buildRustPackage rec { +rustPlatform.buildRustPackage rec { pname = "kubie"; version = "0.9.1"; @@ -15,17 +13,16 @@ buildRustPackage rec { cargoSha256 = "13zs2xz3s4732zxsimg7b22d9707ln4gpscznxi13cjkf5as9gbz"; - installPhase = '' - mkdir -p $out/share/bash-completion/completions - cp -v ${src}/completion/kubie.bash $out/share/bash-completion/completions/kubie + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion completion/kubie.bash ''; meta = with stdenv.lib; { - description = - "Shell independent context and namespace switcher for kubectl"; + description = "Shell independent context and namespace switcher for kubectl"; homepage = "https://github.com/sbstp/kubie"; license = with licenses; [ zlib ]; maintainers = with maintainers; [ illiusdope ]; - platforms = platforms.all; }; } From f80ee73963b80d86dfa6adbb3538537b2a35758d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 19 May 2020 04:20:00 -0500 Subject: [PATCH 3/3] kubie: enable on darwin --- pkgs/development/tools/kubie/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/kubie/default.nix b/pkgs/development/tools/kubie/default.nix index bdb8f0ea1479..1895cd0786dd 100644 --- a/pkgs/development/tools/kubie/default.nix +++ b/pkgs/development/tools/kubie/default.nix @@ -1,4 +1,4 @@ -{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles }: +{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }: rustPlatform.buildRustPackage rec { pname = "kubie"; @@ -15,6 +15,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + postInstall = '' installShellCompletion completion/kubie.bash ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f95c26e52123..d37bd1adc7af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10573,7 +10573,9 @@ in kubicorn = callPackage ../development/tools/kubicorn { }; - kubie = callPackage ../development/tools/kubie { }; + kubie = callPackage ../development/tools/kubie { + inherit (darwin.apple_sdk.frameworks) Security; + }; kustomize = callPackage ../development/tools/kustomize { };