2018-04-06 21:39:52 +02:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
|
|
|
, pyasn1, pyasn1-modules, pytest
|
|
|
|
, openldap, cyrus_sasl }:
|
2017-01-13 16:21:37 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "python-ldap";
|
2018-04-04 20:10:29 +02:00
|
|
|
version = "3.0.0";
|
2017-01-13 16:21:37 +01:00
|
|
|
|
2017-05-29 03:05:56 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-04-04 20:10:29 +02:00
|
|
|
sha256 = "86746b912a2cd37a54b06c694f021b0c8556d4caeab75ef50435ada152e2fbe1";
|
2017-01-13 16:21:37 +01:00
|
|
|
};
|
|
|
|
|
2018-04-06 21:39:52 +02:00
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
|
|
|
|
|
|
|
|
buildInputs = [ openldap cyrus_sasl ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
2017-08-29 10:14:53 +02:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# Needed by tests to setup a mockup ldap server.
|
2017-06-01 01:30:29 +02:00
|
|
|
export BIN="${openldap}/bin"
|
|
|
|
export SBIN="${openldap}/bin"
|
|
|
|
export SLAPD="${openldap}/libexec/slapd"
|
|
|
|
export SCHEMA="${openldap}/etc/schema"
|
2017-08-29 10:14:53 +02:00
|
|
|
|
2018-04-06 21:39:52 +02:00
|
|
|
py.test
|
2017-06-01 01:30:29 +02:00
|
|
|
'';
|
2017-01-13 16:21:37 +01:00
|
|
|
}
|