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

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

45 lines
1.1 KiB
Nix
Raw Normal View History

{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
2020-08-06 00:43:45 +00:00
2021-04-02 13:44:54 +00:00
buildGoModule rec {
pname = "dapr-cli";
2022-08-12 06:01:23 +00:00
version = "1.8.1";
2020-08-06 00:43:45 +00:00
src = fetchFromGitHub {
owner = "dapr";
repo = "cli";
rev = "v${version}";
2022-08-12 06:01:23 +00:00
sha256 = "sha256-NzHg/pn0Gek3JhcdOBFilmmw0xaKtjTote11LLr4oj8=";
2020-08-06 00:43:45 +00:00
};
2022-07-09 07:10:21 +00:00
vendorSha256 = "sha256-ZsuDaFcBPZuyt5rmjeBkzkrphCCcraLZCrMiQ2FtAUc=";
nativeBuildInputs = [ installShellFiles ];
preCheck = ''
export HOME=$(mktemp -d)
'';
2020-08-16 00:23:57 +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
installShellCompletion --cmd dapr \
--bash <($out/bin/dapr completion bash) \
--zsh <($out/bin/dapr completion zsh)
2020-08-06 00:43:45 +00:00
'';
meta = with lib; {
2020-08-06 00:43:45 +00:00
description = "A CLI for managing Dapr, the distributed application runtime";
homepage = "https://dapr.io";
2020-08-06 00:43:45 +00:00
license = licenses.mit;
maintainers = with maintainers; [ joshvanl lucperkins ];
mainProgram = "dapr";
2020-08-06 00:43:45 +00:00
};
}