1{ lib, stdenv, fetchFromGitHub, automake, cmake, autoconf, curl, numactl }:
2
3stdenv.mkDerivation rec {
4 pname = "grpc_cli";
5 version = "1.58.0";
6 src = fetchFromGitHub {
7 owner = "grpc";
8 repo = "grpc";
9 rev = "v${version}";
10 hash = "sha256-JxkQZSmI3FSAoSd45uciCpsTeGuAvRhG/BGyC4NKOjo=";
11 fetchSubmodules = true;
12 };
13 nativeBuildInputs = [ automake cmake autoconf ];
14 buildInputs = [ curl numactl ];
15 cmakeFlags = [ "-DgRPC_BUILD_TESTS=ON" ];
16 makeFlags = [ "grpc_cli" ];
17 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-error=format-security";
18 installPhase = ''
19 runHook preInstall
20
21 install -Dm555 grpc_cli "$out/bin/grpc_cli"
22
23 runHook postInstall
24 '';
25 meta = with lib; {
26 description = "The command line tool for interacting with grpc services.";
27 homepage = "https://github.com/grpc/grpc";
28 license = licenses.asl20;
29 maintainers = with maintainers; [ doriath ];
30 platforms = platforms.linux;
31 };
32}