2022-04-25 23:20:41 +02:00
|
|
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
2020-08-06 02:43:45 +02:00
|
|
|
|
2021-04-02 15:44:54 +02:00
|
|
|
buildGoModule rec {
|
2022-04-25 23:20:41 +02:00
|
|
|
pname = "dapr-cli";
|
2023-03-30 19:19:49 +02:00
|
|
|
version = "1.10.0";
|
2020-08-06 02:43:45 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dapr";
|
|
|
|
repo = "cli";
|
|
|
|
rev = "v${version}";
|
2023-03-30 19:19:49 +02:00
|
|
|
sha256 = "sha256-LBsJjAtsKlecRhes9q+HYCwlhZn0jUhhEzu62nATGz8=";
|
2020-08-06 02:43:45 +02:00
|
|
|
};
|
|
|
|
|
2023-04-08 12:59:16 +02:00
|
|
|
vendorSha256 = "sha256-t2uew44kLLDM6cuWUV5Joa+h88BhRv3GnnckDshB5Tw=";
|
|
|
|
|
|
|
|
proxyVendor = true;
|
2022-04-25 23:20:41 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2023-03-30 19:19:49 +02:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-04-25 23:20:41 +02:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
2020-08-16 02:23:57 +02:00
|
|
|
|
2023-01-09 15:32:23 +01: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 02:43:45 +02:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/cli $out/bin/dapr
|
2022-04-25 23:20:41 +02:00
|
|
|
|
|
|
|
installShellCompletion --cmd dapr \
|
|
|
|
--bash <($out/bin/dapr completion bash) \
|
|
|
|
--zsh <($out/bin/dapr completion zsh)
|
2020-08-06 02:43:45 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-08-06 02:43:45 +02:00
|
|
|
description = "A CLI for managing Dapr, the distributed application runtime";
|
2022-05-05 02:46:39 +02:00
|
|
|
homepage = "https://dapr.io";
|
2023-03-30 17:06:55 +02:00
|
|
|
license = licenses.asl20;
|
2023-01-09 15:32:23 +01:00
|
|
|
maintainers = with maintainers; [ joshvanl lucperkins ];
|
2022-05-05 02:46:39 +02:00
|
|
|
mainProgram = "dapr";
|
2020-08-06 02:43:45 +02:00
|
|
|
};
|
|
|
|
}
|