Skip to content

Commit

Permalink
djangocms-admin-style
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Nov 6, 2024
1 parent c92055b commit 0718b84
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions pkgs/development/python-modules/djangocms-admin-style/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
django,
pythonOlder,
pytestCheckHook,
setuptools,
django-cms,
djangocms-admin-style,
}:

buildPythonPackage rec {
Expand All @@ -15,22 +17,36 @@ buildPythonPackage rec {

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
hash = "sha256-2iDeODHxoadN4z/hK704ZaACepgoeMAqodECsceZ12c=";
src = fetchFromGitHub {
owner = "django-cms";
repo = "djangocms-admin-style";
rev = "refs/tags/${version}";
hash = "sha256-cDbmC7IJTT3NuVXBnbUVqC7dUfusMdntDGu2tSvxIdQ=";
};

build-system = [ setuptools ];

dependencies = [ django ];

env.DJANGO_SETTINGS_MODULE = "tests.settings";
nativeCheckInputs = [ pytestCheckHook ];

checkInputs = [ pytestCheckHook ];
checkInputs = [ django-cms ];

# Tests depend on django-cms, which depends on this package.
# To avoid infinite recursion, we only enable tests when building passthru.tests.
doCheck = false;

#pythonImportCheck = [ "django-cms" ];
preCheck = ''
export DJANGO_SETTINGS_MODULE="tests.settings"
'';

passthru.tests = {
runTests = djangocms-admin-style.overridePythonAttrs (_: {
doCheck = true;
});
};

pythonImportCheck = [ "djangocms_admin_style" ];

meta = {
description = "Django Theme tailored to the needs of django CMS";
Expand Down

0 comments on commit 0718b84

Please sign in to comment.