From 30e155c55264c66610db2ac249edf0238673f790 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:20:41 -0300 Subject: [PATCH] dapr-cli: 1.1.0 -> 1.7.0 * renamed package to match top-level * tests fixed * autocomplete added * minor cleanup/refactoring --- pkgs/development/tools/dapr/cli/default.nix | 23 ++++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/dapr/cli/default.nix b/pkgs/development/tools/dapr/cli/default.nix index 59e04455c2a..96b86719e6c 100644 --- a/pkgs/development/tools/dapr/cli/default.nix +++ b/pkgs/development/tools/dapr/cli/default.nix @@ -1,23 +1,30 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, installShellFiles, lib }: buildGoModule rec { - pname = "dapr"; - version = "1.1.0"; - - vendorSha256 = "0fng5a1pvpbwil79xapdalzgkgc9dwsdxs6bznjfwnkyd1vvw6fm"; + pname = "dapr-cli"; + version = "1.7.0"; src = fetchFromGitHub { - sha256 = "0x2mvlzlmcik6ys6xp722px9l4lj9ssyxb06bzxd7yj7m1wwcwp9"; - owner = "dapr"; repo = "cli"; rev = "v${version}"; + sha256 = "sha256-+P1oXG+uvnFDGis5pz9VUQ4n1C7mjuetXz1OtN7IIrg="; }; - doCheck = false; + vendorSha256 = "sha256-EvOyOy7DFQtFavOC9eBUZRJsj3pNdx7jumVmZ/THdaM="; + + nativeBuildInputs = [ installShellFiles ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; postInstall = '' mv $out/bin/cli $out/bin/dapr + + installShellCompletion --cmd dapr \ + --bash <($out/bin/dapr completion bash) \ + --zsh <($out/bin/dapr completion zsh) ''; meta = with lib; {