2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
2021-12-06 16:07:01 +00:00
|
|
|
, django
|
|
|
|
, tablib
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, lxml
|
|
|
|
, openpyxl
|
|
|
|
, psycopg2
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
, pytest-django
|
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-tables2";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.7.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jieter";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-VB7xmcBncTUYllzKS4o7G7u+KoivMiiEQGZ4x+Rnces=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
tablib = [
|
|
|
|
tablib
|
|
|
|
]
|
|
|
|
++ tablib.optional-dependencies.xls
|
|
|
|
++ tablib.optional-dependencies.yaml;
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.app.settings";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
lxml
|
|
|
|
openpyxl
|
|
|
|
psycopg2
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
pytest-django
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# requires django-filters
|
|
|
|
"tests/test_views.py"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/jieter/django-tables2/blob/v${version}/CHANGELOG.md";
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Django app for creating HTML tables";
|
|
|
|
homepage = "https://github.com/jieter/django-tables2";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|