2018-07-21 00:44:44 +00:00
|
|
|
{ buildPythonPackage, fetchPypi
|
2021-03-27 05:59:08 -04:00
|
|
|
, pyasn1, pyasn1-modules
|
|
|
|
, pythonAtLeast, pytestCheckHook
|
2021-01-11 08:54:33 +01:00
|
|
|
, openldap, cyrus_sasl, lib, stdenv }:
|
2017-01-13 16:21:37 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "python-ldap";
|
2021-12-06 13:16:42 +00:00
|
|
|
version = "3.4.0";
|
2017-01-13 16:21:37 +01:00
|
|
|
|
2017-05-29 02:05:56 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 13:16:42 +00:00
|
|
|
sha256 = "60464c8fc25e71e0fd40449a24eae482dcd0fb7fcf823e7de627a6525b3e0d12";
|
2017-01-13 16:21:37 +01:00
|
|
|
};
|
|
|
|
|
2018-04-06 21:39:52 +02:00
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
|
|
|
|
2021-03-27 05:59:08 -04:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2018-04-06 21:39:52 +02:00
|
|
|
buildInputs = [ openldap cyrus_sasl ];
|
|
|
|
|
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
|
|
|
|
2021-03-27 05:59:08 -04:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.9") [
|
|
|
|
# See https://github.com/python-ldap/python-ldap/issues/407
|
|
|
|
"test_simple_bind_noarg"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
}
|