1{
2 lib,
3 fetchPypi,
4 fetchpatch,
5 buildPythonPackage,
6 dos2unix,
7 pyasn1,
8}:
9
10buildPythonPackage rec {
11 pname = "ldap3";
12 version = "2.9.1";
13 format = "setuptools";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "f3e7fc4718e3f09dda568b57100095e0ce58633bcabbed8667ce3f8fbaa4229f";
18 };
19
20 prePatch = ''
21 # patch fails to apply because of line endings
22 dos2unix ldap3/utils/asn1.py
23 '';
24
25 patches = [
26 # fix pyasn1 0.5.0 compability
27 # https://github.com/cannatag/ldap3/pull/983
28 (fetchpatch {
29 url = "https://github.com/cannatag/ldap3/commit/ca689f4893b944806f90e9d3be2a746ee3c502e4.patch";
30 hash = "sha256-A8qI0t1OV3bkKaSdhVWHFBC9MoSkWynqxpgznV+5gh8=";
31 })
32 ];
33
34 nativeBuildInputs = [ dos2unix ];
35
36 propagatedBuildInputs = [ pyasn1 ];
37
38 doCheck = false; # requires network
39
40 meta = with lib; {
41 homepage = "https://pypi.python.org/pypi/ldap3";
42 description = "Strictly RFC 4510 conforming LDAP V3 pure Python client library";
43 license = licenses.lgpl3;
44 maintainers = [ ];
45 };
46}