2022-04-25 21:20:41 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
2020-08-06 00:43:45 +00:00
|
|
|
|
2021-04-02 13:44:54 +00:00
|
|
|
buildGoModule rec {
|
2022-04-25 21:20:41 +00:00
|
|
|
pname = "dapr-cli";
|
2024-03-06 11:59:28 +00:00
|
|
|
version = "1.13.0";
|
2020-08-06 00:43:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dapr";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2024-03-06 11:59:28 +00:00
|
|
|
sha256 = "sha256-nR9+6glX0oUJZq32XxyV4aVjfjVlNycZvMNaVHy+Q1s=";
|
2020-08-06 00:43:45 +00:00
|
|
|
};
|
|
|
|
|
2024-04-05 21:03:12 +00:00
|
|
|
vendorHash = "sha256-kFmoNd40YxUXVXk0F1Bf77KS5AM0jjOTwTjM5pYKkv4=";
|
2023-04-08 10:59:16 +00:00
|
|
|
|
|
|
|
proxyVendor = true;
|
2022-04-25 21:20:41 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-03-30 17:19:49 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-04-25 21:20:41 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-08-16 00:23:57 +00:00
|
|
|
|
2023-01-09 14:32:23 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X main.version=${version}"
|
|
|
|
"-X main.apiVersion=1.0"
|
|
|
|
"-X github.com/dapr/cli/pkg/standalone.gitcommit=${src.rev}"
|
|
|
|
"-X github.com/dapr/cli/pkg/standalone.gitversion=${version}"
|
|
|
|
];
|
|
|
|
|
2020-08-06 00:43:45 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/dapr
|
2022-04-25 21:20:41 +00:00
|
|
|
|
|
|
|
installShellCompletion --cmd dapr \
|
|
|
|
--bash <($out/bin/dapr completion bash) \
|
|
|
|
--zsh <($out/bin/dapr completion zsh)
|
2020-08-06 00:43:45 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-08-06 00:43:45 +00:00
|
|
|
description = "A CLI for managing Dapr, the distributed application runtime";
|
2022-05-05 00:46:39 +00:00
|
|
|
homepage = "https://dapr.io";
|
2023-03-30 15:06:55 +00:00
|
|
|
license = licenses.asl20;
|
2023-01-09 14:32:23 +00:00
|
|
|
maintainers = with maintainers; [ joshvanl lucperkins ];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "dapr";
|
2020-08-06 00:43:45 +00:00
|
|
|
};
|
|
|
|
}
|