2022-09-16 01:54:14 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2022-09-18 02:18:59 +02:00
|
|
|
, fetchFromGitHub
|
2022-09-16 01:54:14 +02:00
|
|
|
, pyasn1
|
|
|
|
, pyasn1-modules
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, openldap
|
|
|
|
, cyrus_sasl
|
|
|
|
}:
|
2017-01-13 16:21:37 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "python-ldap";
|
2022-09-18 02:18:59 +02:00
|
|
|
version = "3.4.3";
|
2022-09-16 01:54:14 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-01-13 16:21:37 +01:00
|
|
|
|
2022-09-18 02:18:59 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/python-ldap-${version}";
|
|
|
|
hash = "sha256-/ehvSs2qjuTPhaaOP0agPbWyyRugBpUlPq/Ny9t2C58=";
|
2017-01-13 16:21:37 +01:00
|
|
|
};
|
|
|
|
|
2022-09-16 01:54:14 +02:00
|
|
|
buildInputs = [
|
|
|
|
openldap
|
|
|
|
cyrus_sasl
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyasn1
|
|
|
|
pyasn1-modules
|
|
|
|
];
|
2018-04-06 21:39:52 +02:00
|
|
|
|
2022-09-16 01:54:14 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2018-04-06 21:39:52 +02:00
|
|
|
|
2021-03-27 05:59:08 -04:00
|
|
|
preCheck = ''
|
2017-08-29 09:14:53 +01:00
|
|
|
# Needed by tests to setup a mockup ldap server.
|
2017-06-01 00:30:29 +01:00
|
|
|
export BIN="${openldap}/bin"
|
|
|
|
export SBIN="${openldap}/bin"
|
|
|
|
export SLAPD="${openldap}/libexec/slapd"
|
|
|
|
export SCHEMA="${openldap}/etc/schema"
|
|
|
|
'';
|
2018-08-16 21:10:19 -05:00
|
|
|
|
2022-11-14 16:28:36 +01:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/python-ldap/python-ldap/issues/501
|
|
|
|
"test_tls_ext_noca"
|
|
|
|
];
|
|
|
|
|
2018-08-16 21:10:19 -05:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-04-05 19:16:24 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-04-05 19:16:24 +02:00
|
|
|
description = "Python modules for implementing LDAP clients";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://www.python-ldap.org/";
|
2019-04-05 19:16:24 +02:00
|
|
|
license = licenses.psfl;
|
|
|
|
};
|
2017-01-13 16:21:37 +01:00
|
|
|
}
|