Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 56 lines 1.2 kB view raw
1{ 2 buildGoModule, 3 fetchFromGitHub, 4 installShellFiles, 5 lib, 6}: 7 8buildGoModule rec { 9 pname = "dapr-cli"; 10 version = "1.15.2"; 11 12 src = fetchFromGitHub { 13 owner = "dapr"; 14 repo = "cli"; 15 rev = "v${version}"; 16 hash = "sha256-S7z6v4J+ZsSgsupU0AYcRgFmIG8szbMoW5tFIix9HBs="; 17 }; 18 19 vendorHash = "sha256-RH802JcEHzrVEf4t7O0croSc36LNM6MtFXFJtDffIvU="; 20 21 proxyVendor = true; 22 23 nativeBuildInputs = [ installShellFiles ]; 24 25 subPackages = [ "." ]; 26 27 preCheck = '' 28 export HOME=$(mktemp -d) 29 ''; 30 31 ldflags = [ 32 "-X main.version=${version}" 33 "-X main.apiVersion=1.0" 34 "-X github.com/dapr/cli/pkg/standalone.gitcommit=${src.rev}" 35 "-X github.com/dapr/cli/pkg/standalone.gitversion=${version}" 36 ]; 37 38 postInstall = '' 39 mv $out/bin/cli $out/bin/dapr 40 41 installShellCompletion --cmd dapr \ 42 --bash <($out/bin/dapr completion bash) \ 43 --zsh <($out/bin/dapr completion zsh) 44 ''; 45 46 meta = with lib; { 47 description = "CLI for managing Dapr, the distributed application runtime"; 48 homepage = "https://dapr.io"; 49 license = licenses.asl20; 50 maintainers = with maintainers; [ 51 joshvanl 52 lucperkins 53 ]; 54 mainProgram = "dapr"; 55 }; 56}