2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools-scm
|
|
|
|
, django
|
|
|
|
, python
|
2023-10-09 19:29:22 +00:00
|
|
|
, pythonOlder
|
2022-04-15 01:41:22 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-widget-tweaks";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.5.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-09-25 04:45:31 +00:00
|
|
|
owner = "jazzband";
|
|
|
|
repo = pname;
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-/3UIsg75X3R9YGv9cEcoPw3IN2vkhUb+HCy68813d2E=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m django test --settings=tests.settings
|
|
|
|
'';
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "Tweak the form field rendering in templates, not in python-level form definitions";
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://github.com/jazzband/django-widget-tweaks";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/jazzband/django-widget-tweaks/blob/${version}/CHANGES.rst";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ maxxk ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|