Files
nixpkgs/pkgs/development/python-modules/django-tables2/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

66 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
django,
tablib,
# tests
django-filter,
lxml,
openpyxl,
psycopg2,
pytz,
pyyaml,
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "django-tables2";
version = "2.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jieter";
repo = "django-tables2";
tag = "v${version}";
hash = "sha256-gEURC3LUBdqebd4+TAJcbgn4SpY1oTI+tg9p2GGKClE=";
};
build-system = [ hatchling ];
dependencies = [ django ];
optional-dependencies = {
tablib = [ tablib ] ++ tablib.optional-dependencies.xls ++ tablib.optional-dependencies.yaml;
};
env.DJANGO_SETTINGS_MODULE = "tests.app.settings";
nativeCheckInputs = [
django-filter
lxml
openpyxl
psycopg2
pytz
pyyaml
pytest-django
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
meta = {
changelog = "https://github.com/jieter/django-tables2/blob/v${version}/CHANGELOG.md";
description = "Django app for creating HTML tables";
homepage = "https://github.com/jieter/django-tables2";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ hexa ];
};
}