1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 django, 6 pythonOlder, 7 pytestCheckHook, 8 setuptools, 9 pytest-django, 10 django-cms, 11 djangocms-admin-style, 12}: 13 14buildPythonPackage rec { 15 pname = "djangocms-admin-style"; 16 version = "3.3.1"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "django-cms"; 23 repo = "djangocms-admin-style"; 24 tag = version; 25 hash = "sha256-cDbmC7IJTT3NuVXBnbUVqC7dUfusMdntDGu2tSvxIdQ="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 dependencies = [ django ]; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 pytest-django 35 ]; 36 37 checkInputs = [ django-cms ]; 38 39 preCheck = '' 40 export DJANGO_SETTINGS_MODULE="tests.settings" 41 ''; 42 43 disabledTests = [ 44 # django.template.exceptions.TemplateDoesNotExist: admin/inc/cms_upgrade_notification.html 45 "test_render_update_notification" 46 # AssertionError: 'my site' != 'example.com' 47 "test_current_site_name" 48 # django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured 49 "test_render_update_notification" 50 "test_current_site_name" 51 "test_for_missing_migrations" 52 ]; 53 54 # Tests depend on django-cms which depends on this package. 55 # To avoid infinite recursion, we only enable tests when building passthru.tests. 56 doCheck = false; 57 58 passthru.tests = { 59 runTests = djangocms-admin-style.overridePythonAttrs (_: { 60 doCheck = true; 61 }); 62 }; 63 64 pythonImportsCheck = [ "djangocms_admin_style" ]; 65 66 meta = { 67 description = "Django Theme tailored to the needs of django CMS"; 68 homepage = "https://django-cms.org"; 69 changelog = "https://github.com/django-cms/djangocms-admin-style/releases/tag/${version}"; 70 license = lib.licenses.bsd3; 71 maintainers = [ lib.maintainers.onny ]; 72 }; 73}