2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
# buildtime
|
|
|
|
, setuptools-scm
|
|
|
|
|
|
|
|
# runtime
|
2022-02-10 20:34:41 +00:00
|
|
|
, ldap
|
|
|
|
, django
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, python
|
|
|
|
, pkgs
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-auth-ldap";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "4.1.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;
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-d/dJ07F4B86OtWqcnI5XRv8xZWf4HVumE0ldnHSVqUk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
ldap
|
|
|
|
];
|
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;
|
|
|
|
};
|
|
|
|
}
|