1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # buildtime 7 setuptools-scm, 8 9 # runtime 10 django, 11 python-ldap, 12 13 # tests 14 openldap, 15}: 16 17buildPythonPackage rec { 18 pname = "django-auth-ldap"; 19 version = "5.2.0"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "django-auth-ldap"; 24 repo = "django-auth-ldap"; 25 tag = version; 26 hash = "sha256-/Wy5ZCRBIeEXOFqQW4e+GzQWpZyI9o39TfFAVb7OYeo="; 27 }; 28 29 build-system = [ setuptools-scm ]; 30 31 dependencies = [ 32 django 33 python-ldap 34 ]; 35 36 # Duplicate attributeType: "MSADat2:102"\nslapadd: could not add entry dn="cn={4}msuser,cn=schema,cn=config" (line=1): \xd0\xbe\xff\xff\xff\x7f\n' 37 doCheck = false; 38 39 preCheck = '' 40 export PATH=${openldap}/bin:${openldap}/libexec:$PATH 41 export SCHEMA=${openldap}/etc/schema 42 export DJANGO_SETTINGS_MODULE=tests.settings 43 ''; 44 45 checkPhase = '' 46 runHook preCheck 47 python -m django test --settings tests.settings 48 runHook postCheck 49 ''; 50 51 pythonImportsCheck = [ "django_auth_ldap" ]; 52 53 meta = with lib; { 54 changelog = "https://github.com/django-auth-ldap/django-auth-ldap/releases/tag/${src.tag}"; 55 description = "Django authentication backend that authenticates against an LDAP service"; 56 homepage = "https://github.com/django-auth-ldap/django-auth-ldap"; 57 license = licenses.bsd2; 58 maintainers = with maintainers; [ mmai ]; 59 platforms = platforms.linux ++ platforms.darwin; 60 }; 61}