2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy27,
|
|
|
|
|
|
|
|
# buildtime
|
|
|
|
setuptools-scm,
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
django,
|
|
|
|
python-ldap,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
python,
|
|
|
|
pkgs,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-auth-ldap";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "4.8.0";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-YEJQk43cn9phnyR8elmwsvBuU6fT9GoVbyiqMN1xpzg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
2022-09-30 11:47:45 +00:00
|
|
|
python-ldap
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
# ValueError: SCHEMADIR is None, ldap schemas are missing.
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
export PATH=${pkgs.openldap}/bin:${pkgs.openldap}/libexec:$PATH
|
|
|
|
${python.interpreter} -m django test --settings tests.settings
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pythonImportsCheck = [ "django_auth_ldap" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Django authentication backend that authenticates against an LDAP service";
|
|
|
|
homepage = "https://github.com/django-auth-ldap/django-auth-ldap";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|