mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
2641d97cbf
Reproduction script: # Bulk rewrite ./maintainers/scripts/sha-to-sri.py pkgs/by-name # Revert some packages which will need manual intervention for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do git checkout -- "pkgs/by-name/${n:0:2}/${n}" done
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
|
|
|
buildGoModule rec {
|
|
pname = "dapr-cli";
|
|
version = "1.14.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dapr";
|
|
repo = "cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-NjGTH9aKupv/32ibqMSmPPaNA0TSq6AXjN8cjVD6r/M=";
|
|
};
|
|
|
|
vendorHash = "sha256-Ec1z8Wvq8gk8dYcm10ujy7zYWR7Mus1nl21Od3SUFrU=";
|
|
|
|
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";
|
|
};
|
|
}
|