2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
|
|
|
, ldap3
|
|
|
|
, ldaptor
|
|
|
|
, matrix-synapse
|
|
|
|
, pytestCheckHook
|
|
|
|
, service-identity
|
|
|
|
, setuptools
|
|
|
|
, twisted
|
|
|
|
}:
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "matrix-synapse-ldap3";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.2.2";
|
|
|
|
format = "pyproject";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-s4jZVpNIbu9pra79D9noRGPVL+F7AhSgDvyqZptzy3Q=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = [
|
|
|
|
# add support to read bind_password from file
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/matrix-org/matrix-synapse-ldap3/commit/c65e8cbd27a5cd935ce12e7c4b92143cdf795c86.patch";
|
|
|
|
sha256 = "sha256-0g150TW631cuupSRECXL9A261nj45HclDkHBUbKT7jE=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
propagatedBuildInputs = [ service-identity ldap3 twisted ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeCheckInputs = [ ldaptor matrix-synapse pytestCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ldap_auth_provider" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "LDAP3 auth provider for Synapse";
|
|
|
|
homepage = "https://github.com/matrix-org/matrix-synapse-ldap3";
|
|
|
|
license = licenses.asl20;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.c3d2.members;
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
2020-06-18 07:06:33 +00:00
|
|
|
}
|