2018-07-21 01:44:44 +01:00
|
|
|
{ buildPythonPackage, fetchPypi
|
2018-04-06 20:39:52 +01:00
|
|
|
, pyasn1, pyasn1-modules, pytest
|
2021-01-11 07:54:33 +00:00
|
|
|
, openldap, cyrus_sasl, lib, stdenv }:
|
2017-01-13 15:21:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "python-ldap";
|
2020-07-06 18:31:21 +01:00
|
|
|
version = "3.3.1";
|
2017-01-13 15:21:37 +00:00
|
|
|
|
2017-05-29 02:05:56 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-06 18:31:21 +01:00
|
|
|
sha256 = "198as30xy6p760niqps2zdvq2xcmr765h06pmda8fa9y077wl4a7";
|
2017-01-13 15:21:37 +00:00
|
|
|
};
|
|
|
|
|
2018-04-06 20:39:52 +01:00
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
|
|
|
|
|
|
|
buildInputs = [ openldap cyrus_sasl ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
2017-08-29 09:14:53 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# 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"
|
2017-08-29 09:14:53 +01:00
|
|
|
|
2018-04-06 20:39:52 +01:00
|
|
|
py.test
|
2017-06-01 00:30:29 +01:00
|
|
|
'';
|
2018-08-17 03:10:19 +01:00
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-04-05 18:16:24 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-04-05 18:16:24 +01:00
|
|
|
description = "Python modules for implementing LDAP clients";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.python-ldap.org/";
|
2019-04-05 18:16:24 +01:00
|
|
|
license = licenses.psfl;
|
|
|
|
};
|
2017-01-13 15:21:37 +00:00
|
|
|
}
|