2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
cyrus_sasl,
|
|
|
|
openldap,
|
|
|
|
gevent,
|
|
|
|
tornado,
|
|
|
|
trio,
|
|
|
|
pytestCheckHook,
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bonsai";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.5.3";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "noirello";
|
|
|
|
repo = "bonsai";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-SAP/YeWqow5dqXlXDzjnTWIfJhMwVeZSSUfWr1Mgmng=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cyrus_sasl
|
|
|
|
openldap
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2022-12-17 10:02:37 +00:00
|
|
|
gevent = [ gevent ];
|
|
|
|
tornado = [ tornado ];
|
|
|
|
trio = [ trio ];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# requires running LDAP server
|
|
|
|
"tests/test_asyncio.py"
|
|
|
|
"tests/test_ldapclient.py"
|
|
|
|
"tests/test_ldapconnection.py"
|
|
|
|
"tests/test_ldapentry.py"
|
|
|
|
"tests/test_ldapreference.py"
|
|
|
|
"tests/test_pool.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# requires running LDAP server
|
|
|
|
"test_set_async_connect"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "bonsai" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/noirello/bonsai/blob/${src.rev}/CHANGELOG.rst";
|
|
|
|
description = "Python 3 module for accessing LDAP directory servers";
|
|
|
|
homepage = "https://github.com/noirello/bonsai";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|