nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 automake,
6 cmake,
7 autoconf,
8 curl,
9 numactl,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "grpc_cli";
14 version = "1.75.1";
15 src = fetchFromGitHub {
16 owner = "grpc";
17 repo = "grpc";
18 rev = "v${finalAttrs.version}";
19 hash = "sha256-SnKK52VLO4MM/ftfmzRV/LeLfOucdIyHMyWk6EKRfvM=";
20 fetchSubmodules = true;
21 };
22 nativeBuildInputs = [
23 automake
24 cmake
25 autoconf
26 ];
27 buildInputs = [
28 curl
29 numactl
30 ];
31 cmakeFlags = [ "-DgRPC_BUILD_TESTS=ON" ];
32 makeFlags = [ "grpc_cli" ];
33 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-Wno-error=format-security";
34 installPhase = ''
35 runHook preInstall
36
37 install -Dm555 grpc_cli "$out/bin/grpc_cli"
38
39 runHook postInstall
40 '';
41 meta = {
42 description = "Command line tool for interacting with grpc services";
43 homepage = "https://github.com/grpc/grpc";
44 license = lib.licenses.asl20;
45 platforms = lib.platforms.linux;
46 mainProgram = "grpc_cli";
47 };
48})