nixpkgs/pkgs/development/python-modules/ldap/default.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

{ buildPythonPackage, fetchPypi
, pyasn1, pyasn1-modules
, pythonAtLeast, pytestCheckHook
, openldap, cyrus_sasl, lib, stdenv }:
2017-01-13 15:21:37 +00:00
buildPythonPackage rec {
pname = "python-ldap";
2020-07-06 17:31:21 +00:00
version = "3.3.1";
2017-01-13 15:21:37 +00:00
src = fetchPypi {
inherit pname version;
2020-07-06 17:31:21 +00:00
sha256 = "198as30xy6p760niqps2zdvq2xcmr765h06pmda8fa9y077wl4a7";
2017-01-13 15:21:37 +00:00
};
2018-04-06 19:39:52 +00:00
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
checkInputs = [ pytestCheckHook ];
2018-04-06 19:39:52 +00:00
buildInputs = [ openldap cyrus_sasl ];
preCheck = ''
2017-08-29 08:14:53 +00:00
# Needed by tests to setup a mockup ldap server.
export BIN="${openldap}/bin"
export SBIN="${openldap}/bin"
export SLAPD="${openldap}/libexec/slapd"
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;
2019-04-05 17:16:24 +00:00
meta = with lib; {
2019-04-05 17:16:24 +00:00
description = "Python modules for implementing LDAP clients";
homepage = "https://www.python-ldap.org/";
2019-04-05 17:16:24 +00:00
license = licenses.psfl;
};
2017-01-13 15:21:37 +00:00
}