at master 1.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 django, 6 pythonOlder, 7 setuptools, 8 django-classy-tags, 9 django-formtools, 10 django-treebeard, 11 django-sekizai, 12 djangocms-admin-style, 13 python, 14 dj-database-url, 15 djangocms-text-ckeditor, 16 fetchpatch, 17 django-cms, 18 gettext, 19 iptools, 20}: 21 22buildPythonPackage rec { 23 pname = "django-cms"; 24 version = "5.0.2"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.9"; 28 29 src = fetchFromGitHub { 30 owner = "django-cms"; 31 repo = "django-cms"; 32 tag = version; 33 hash = "sha256-qv6eVs5jKJXQczEa6+H5n4+pw1JFTkb7XJD+0DBVFM0="; 34 }; 35 36 build-system = [ setuptools ]; 37 38 dependencies = [ 39 django 40 django-classy-tags 41 django-formtools 42 django-treebeard 43 django-sekizai 44 djangocms-admin-style 45 ]; 46 47 nativeCheckInputs = [ gettext ]; 48 49 checkInputs = [ 50 dj-database-url 51 djangocms-text-ckeditor 52 iptools 53 ]; 54 55 preCheck = '' 56 # Disable ruff formatter test 57 rm cms/tests/test_static_analysis.py 58 ''; 59 60 checkPhase = '' 61 runHook preCheck 62 ${python.interpreter} manage.py test 63 runHook postCheck 64 ''; 65 66 # Tests depend on djangocms-text-ckeditor and djangocms-admin-style, 67 # which depends on this package. 68 # To avoid infinite recursion, we only enable tests when building passthru.tests. 69 doCheck = false; 70 71 passthru.tests = { 72 runTests = django-cms.overridePythonAttrs (_: { 73 doCheck = true; 74 }); 75 }; 76 77 pythonImportsCheck = [ "cms" ]; 78 79 meta = { 80 description = "Lean enterprise content management powered by Django"; 81 homepage = "https://django-cms.org"; 82 changelog = "https://github.com/django-cms/django-cms/releases/tag/${src.tag}"; 83 license = lib.licenses.bsd3; 84 maintainers = [ lib.maintainers.onny ]; 85 }; 86}