depot/third_party/nixpkgs/pkgs/development/python-modules/django-auth-ldap/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

58 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, isPy27
# buildtime
, setuptools-scm
# runtime
, django
, python-ldap
# tests
, python
, pkgs
}:
buildPythonPackage rec {
pname = "django-auth-ldap";
version = "4.4.0";
format = "pyproject";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
hash = "sha256-eXkxrF1VxMoUwXnViSQgzCqYqoHkQyPVlfVBnBtFwwY=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
django
python-ldap
];
# ValueError: SCHEMADIR is None, ldap schemas are missing.
doCheck = false;
checkPhase = ''
runHook preCheck
export PATH=${pkgs.openldap}/bin:${pkgs.openldap}/libexec:$PATH
${python.interpreter} -m django test --settings tests.settings
runHook postCheck
'';
pythonImportsCheck = [ "django_auth_ldap" ];
meta = with lib; {
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;
};
}