2018-07-21 00:44:44 +00:00
|
|
|
{ buildPythonPackage, fetchPypi
|
2018-04-06 19:39:52 +00:00
|
|
|
, pyasn1, pyasn1-modules, pytest
|
2018-08-17 02:10:19 +00:00
|
|
|
, openldap, cyrus_sasl, stdenv }:
|
2017-01-13 15:21:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "python-ldap";
|
2019-04-02 18:37:15 +00:00
|
|
|
version = "3.2.0";
|
2017-01-13 15:21:37 +00:00
|
|
|
|
2017-05-29 01:05:56 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-02 18:37:15 +00:00
|
|
|
sha256 = "13nvrhp85yr0jyxixcjj012iw8l9wynxxlykm9j3alss6waln73x";
|
2017-01-13 15:21:37 +00:00
|
|
|
};
|
|
|
|
|
2018-04-06 19:39:52 +00:00
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
|
|
|
|
|
|
|
buildInputs = [ openldap cyrus_sasl ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
2017-08-29 08:14:53 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# Needed by tests to setup a mockup ldap server.
|
2017-05-31 23:30:29 +00:00
|
|
|
export BIN="${openldap}/bin"
|
|
|
|
export SBIN="${openldap}/bin"
|
|
|
|
export SLAPD="${openldap}/libexec/slapd"
|
|
|
|
export SCHEMA="${openldap}/etc/schema"
|
2017-08-29 08:14:53 +00:00
|
|
|
|
2018-04-06 19:39:52 +00:00
|
|
|
py.test
|
2017-05-31 23:30:29 +00:00
|
|
|
'';
|
2018-08-17 02:10:19 +00:00
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-04-05 17:16:24 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python modules for implementing LDAP clients";
|
|
|
|
homepage = https://www.python-ldap.org/;
|
|
|
|
license = licenses.psfl;
|
|
|
|
};
|
2017-01-13 15:21:37 +00:00
|
|
|
}
|