2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
grpc,
|
|
|
|
six,
|
|
|
|
protobuf,
|
|
|
|
enum34 ? null,
|
|
|
|
futures ? null,
|
|
|
|
isPy27,
|
|
|
|
pkg-config,
|
|
|
|
cython,
|
|
|
|
c-ares,
|
|
|
|
openssl,
|
|
|
|
zlib,
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "grpcio";
|
2022-11-02 22:02:43 +00:00
|
|
|
format = "setuptools";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.62.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-x3YYBx2Wt6i+LBBwGphTeCO5xluiVsC5Bn4FlM29lU0=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
pkg-config
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
c-ares
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
propagatedBuildInputs =
|
|
|
|
[
|
|
|
|
six
|
|
|
|
protobuf
|
|
|
|
]
|
|
|
|
++ lib.optionals (isPy27) [
|
|
|
|
enum34
|
|
|
|
futures
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
preBuild =
|
|
|
|
''
|
|
|
|
export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$NIX_BUILD_CORES"
|
|
|
|
if [ -z "$enableParallelBuilding" ]; then
|
|
|
|
GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=1
|
|
|
|
fi
|
|
|
|
''
|
|
|
|
+ lib.optionalString stdenv.isDarwin ''
|
|
|
|
unset AR
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
GRPC_BUILD_WITH_BORING_SSL_ASM = "";
|
2020-05-03 17:38:23 +00:00
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
|
|
|
|
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# does not contain any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
pythonImportsCheck = [ "grpc" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTTP/2-based RPC framework";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://grpc.io/grpc/python/";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|