2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2019-01-27 11:46:08 +01:00
|
|
|
, buildPythonPackage
|
2022-02-08 18:38:56 +01:00
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
2022-02-14 18:13:51 +01:00
|
|
|
|
|
|
|
# buildtime
|
|
|
|
, setuptools-scm
|
|
|
|
|
|
|
|
# runtime
|
2022-02-08 18:38:56 +01:00
|
|
|
, ldap
|
|
|
|
, django
|
2022-02-14 18:13:51 +01:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, python
|
|
|
|
, pkgs
|
2019-01-27 11:46:08 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-auth-ldap";
|
2022-01-13 16:58:16 -08:00
|
|
|
version = "4.0.0";
|
2022-02-14 18:13:51 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
2019-01-27 11:46:08 +01:00
|
|
|
disabled = isPy27;
|
2022-02-14 18:13:51 +01:00
|
|
|
|
2019-01-27 11:46:08 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-13 16:58:16 -08:00
|
|
|
sha256 = "276f79e624ce083ce13f161387f65ff1c0efe83ef8a42f2b9830d43317b15239";
|
2019-01-27 11:46:08 +01:00
|
|
|
};
|
|
|
|
|
2022-02-14 18:13:51 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2022-02-08 18:38:56 +01:00
|
|
|
|
2022-02-14 18:13:51 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
ldap
|
|
|
|
];
|
2022-02-08 18:38:56 +01:00
|
|
|
|
2022-02-14 18:13:51 +01:00
|
|
|
# ValueError: SCHEMADIR is None, ldap schemas are missing.
|
2019-01-27 11:46:08 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-02-14 18:13:51 +01: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-26 19:06:32 +02:00
|
|
|
pythonImportsCheck = [ "django_auth_ldap" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-01-27 11:46:08 +01:00
|
|
|
description = "Django authentication backend that authenticates against an LDAP service";
|
2020-04-06 16:49:54 +00:00
|
|
|
homepage = "https://github.com/django-auth-ldap/django-auth-ldap";
|
2019-01-27 11:46:08 +01:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|