diff --git a/pkgs/development/tools/dapr/cli/default.nix b/pkgs/development/tools/dapr/cli/default.nix index 59e04455c2a4..96b86719e6c8 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; {