2018-04-06 20:39:52 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
|
|
|
, pyasn1, pyasn1-modules, pytest
|
|
|
|
, openldap, cyrus_sasl }:
|
2017-01-13 15:21:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "python-ldap";
|
2018-06-12 17:47:02 +01:00
|
|
|
version = "3.1.0";
|
2017-01-13 15:21:37 +00:00
|
|
|
|
2017-05-29 02:05:56 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-12 17:47:02 +01:00
|
|
|
sha256 = "41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5";
|
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
|
|
|
'';
|
2017-01-13 15:21:37 +00:00
|
|
|
}
|