1 { buildPythonPackage, fetchPypi
2 , pyasn1, pyasn1-modules
3 , pythonAtLeast, pytestCheckHook
4 , openldap, cyrus_sasl, lib, stdenv }:
6 buildPythonPackage rec {
11 inherit pname version;
12 sha256 = "198as30xy6p760niqps2zdvq2xcmr765h06pmda8fa9y077wl4a7";
15 propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
17 checkInputs = [ pytestCheckHook ];
18 buildInputs = [ openldap cyrus_sasl ];
21 # Needed by tests to setup a mockup ldap server.
22 export BIN="${openldap}/bin"
23 export SBIN="${openldap}/bin"
24 export SLAPD="${openldap}/libexec/slapd"
25 export SCHEMA="${openldap}/etc/schema"
28 disabledTests = lib.optionals (pythonAtLeast "3.9") [
29 # See https://github.com/python-ldap/python-ldap/issues/407
30 "test_simple_bind_noarg"
33 doCheck = !stdenv.isDarwin;
36 description = "Python modules for implementing LDAP clients";
37 homepage = "https://www.python-ldap.org/";
38 license = licenses.psfl;