2022-04-27 09:35:20 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildGoModule rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "dapr-cli";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.7.1";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dapr";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-gEYN9r5hHRya1nqle8qHaUaOpuBN8cSLJx2FBRqyztw=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
vendorSha256 = "sha256-RGEoewLDKo+D9Wp/v8PI/LPjCh2rFrdLO/AS4RWFliY=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/dapr
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
installShellCompletion --cmd dapr \
|
|
|
|
--bash <($out/bin/dapr completion bash) \
|
|
|
|
--zsh <($out/bin/dapr completion zsh)
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "A CLI for managing Dapr, the distributed application runtime";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://dapr.io";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lucperkins ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "dapr";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|