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

38 lines
873 B
Nix
Raw Normal View History

{ buildPythonPackage, fetchPypi
2018-04-06 21:39:52 +02:00
, pyasn1, pyasn1-modules, pytest
, openldap, cyrus_sasl, stdenv }:
2017-01-13 16:21:37 +01:00
buildPythonPackage rec {
pname = "python-ldap";
version = "3.2.0";
2017-01-13 16:21:37 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "13nvrhp85yr0jyxixcjj012iw8l9wynxxlykm9j3alss6waln73x";
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.
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
'';
doCheck = !stdenv.isDarwin;
2019-04-05 19:16:24 +02:00
meta = with stdenv.lib; {
description = "Python modules for implementing LDAP clients";
homepage = "https://www.python-ldap.org/";
2019-04-05 19:16:24 +02:00
license = licenses.psfl;
};
2017-01-13 16:21:37 +01:00
}