Files
nixpkgs/pkgs/by-name/da/dapr-cli/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

57 lines
1.2 KiB
Nix

{
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
}:
buildGoModule rec {
pname = "dapr-cli";
version = "1.16.1";
src = fetchFromGitHub {
owner = "dapr";
repo = "cli";
rev = "v${version}";
hash = "sha256-Z8Fuisx2hK6QAJ5NDh0f11t/hoHhbD2+/mZMsUFxPaQ=";
};
vendorHash = "sha256-qEbuu4+pQ6g3m1FtisYc26lG/4zY/boQM8d6qA5c1eo=";
proxyVendor = true;
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "." ];
preCheck = ''
export HOME=$(mktemp -d)
'';
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}"
];
postInstall = ''
mv $out/bin/cli $out/bin/dapr
installShellCompletion --cmd dapr \
--bash <($out/bin/dapr completion bash) \
--zsh <($out/bin/dapr completion zsh)
'';
meta = with lib; {
description = "CLI for managing Dapr, the distributed application runtime";
homepage = "https://dapr.io";
license = licenses.asl20;
maintainers = with maintainers; [
joshvanl
lucperkins
];
mainProgram = "dapr";
};
}