nixpkgs-suyu/pkgs/development/tools/dapr/cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
902 B
Nix
Raw Normal View History

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