depot/third_party/nixpkgs/pkgs/development/python-modules/ldap/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

37 lines
873 B
Nix

{ buildPythonPackage, fetchPypi
, pyasn1, pyasn1-modules, pytest
, openldap, cyrus_sasl, stdenv }:
buildPythonPackage rec {
pname = "python-ldap";
version = "3.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "13nvrhp85yr0jyxixcjj012iw8l9wynxxlykm9j3alss6waln73x";
};
propagatedBuildInputs = [ pyasn1 pyasn1-modules ];
buildInputs = [ openldap cyrus_sasl ];
checkInputs = [ pytest ];
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"
py.test
'';
doCheck = !stdenv.isDarwin;
meta = with stdenv.lib; {
description = "Python modules for implementing LDAP clients";
homepage = "https://www.python-ldap.org/";
license = licenses.psfl;
};
}