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