|
|
|
@ -1,21 +1,39 @@ |
|
|
|
|
{ buildPythonPackage, fetchPypi |
|
|
|
|
, pyasn1, pyasn1-modules |
|
|
|
|
, pythonAtLeast, pytestCheckHook |
|
|
|
|
, openldap, cyrus_sasl, lib, stdenv }: |
|
|
|
|
{ lib |
|
|
|
|
, stdenv |
|
|
|
|
, buildPythonPackage |
|
|
|
|
, fetchPypi |
|
|
|
|
, pyasn1 |
|
|
|
|
, pyasn1-modules |
|
|
|
|
, pythonAtLeast |
|
|
|
|
, pythonOlder |
|
|
|
|
, pytestCheckHook |
|
|
|
|
, openldap |
|
|
|
|
, cyrus_sasl |
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
buildPythonPackage rec { |
|
|
|
|
pname = "python-ldap"; |
|
|
|
|
version = "3.4.2"; |
|
|
|
|
disabled = pythonOlder "3.6"; |
|
|
|
|
|
|
|
|
|
src = fetchPypi { |
|
|
|
|
inherit pname version; |
|
|
|
|
sha256 = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc="; |
|
|
|
|
hash = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc="; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyasn1 pyasn1-modules ]; |
|
|
|
|
buildInputs = [ |
|
|
|
|
openldap |
|
|
|
|
cyrus_sasl |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ |
|
|
|
|
pyasn1 |
|
|
|
|
pyasn1-modules |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ]; |
|
|
|
|
buildInputs = [ openldap cyrus_sasl ]; |
|
|
|
|
checkInputs = [ |
|
|
|
|
pytestCheckHook |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
preCheck = '' |
|
|
|
|
# Needed by tests to setup a mockup ldap server. |
|
|
|
@ -25,11 +43,6 @@ buildPythonPackage rec { |
|
|
|
|
export SCHEMA="${openldap}/etc/schema" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.9") [ |
|
|
|
|
# See https://github.com/python-ldap/python-ldap/issues/407 |
|
|
|
|
"test_simple_bind_noarg" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin; |
|
|
|
|
|
|
|
|
|
meta = with lib; { |