2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage, fetchPypi
|
|
|
|
, pyasn1, pyasn1-modules, pytest
|
2021-01-15 22:18:51 +00:00
|
|
|
, openldap, cyrus_sasl, lib, stdenv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-ldap";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "3.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "198as30xy6p760niqps2zdvq2xcmr765h06pmda8fa9y077wl4a7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
|
|
|
|
|
|
|
buildInputs = [ openldap cyrus_sasl ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python modules for implementing LDAP clients";
|
|
|
|
homepage = "https://www.python-ldap.org/";
|
|
|
|
license = licenses.psfl;
|
|
|
|
};
|
|
|
|
}
|