diff options
Diffstat (limited to 'pkgs/development/python-modules/python-ldap')
| -rw-r--r-- | pkgs/development/python-modules/python-ldap/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-ldap/default.nix b/pkgs/development/python-modules/python-ldap/default.nix new file mode 100644 index 000000000000..ea9e8ca852d7 --- /dev/null +++ b/pkgs/development/python-modules/python-ldap/default.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyasn1 +, pyasn1-modules +, pythonAtLeast +, pythonOlder +, pytestCheckHook +, openldap +, cyrus_sasl +}: + +buildPythonPackage rec { + pname = "python-ldap"; + version = "3.4.2"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc="; + }; + + buildInputs = [ + openldap + cyrus_sasl + ]; + + propagatedBuildInputs = [ + pyasn1 + pyasn1-modules + ]; + + checkInputs = [ + pytestCheckHook + ]; + + preCheck = '' + # Needed by tests to setup a mockup ldap server. + export BIN="${openldap}/bin" + export SBIN="${openldap}/bin" + export SLAPD="${openldap}/libexec/slapd" + export SCHEMA="${openldap}/etc/schema" + ''; + + doCheck = !stdenv.isDarwin; + + meta = with lib; { + description = "Python modules for implementing LDAP clients"; + homepage = "https://www.python-ldap.org/"; + license = licenses.psfl; + }; +} |
