depot/third_party/nixpkgs/pkgs/development/python-modules/pulsar/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

57 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
cmake,
pkg-config,
libpulsar,
pybind11,
certifi,
}:
buildPythonPackage rec {
pname = "pulsar";
version = "3.5.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "apache";
repo = "pulsar-client-python";
rev = "refs/tags/v${version}";
hash = "sha256-2Ahv0lfeHuBhGIYhiTjKegEKsJqHkpK3Qu6xBnjsanI=";
};
disabled = pythonOlder "3.7";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libpulsar
pybind11
];
preBuild = ''
make -j$NIX_BUILD_CORES
make install
cd ..
'';
propagatedBuildInputs = [ certifi ];
# Requires to setup a cluster
doCheck = false;
pythonImportsCheck = [ "pulsar" ];
meta = with lib; {
description = "Apache Pulsar Python client library";
homepage = "https://pulsar.apache.org/docs/next/client-libraries-python/";
changelog = "https://github.com/apache/pulsar-client-python/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ gaelreyrol ];
};
}