Files
nixpkgs/pkgs/development/python-modules/django-pattern-library/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

60 lines
1.2 KiB
Nix

{
buildPythonPackage,
fetchFromGitHub,
lib,
# build-system
poetry-core,
# dependencies
django,
markdown,
pyyaml,
# tests
beautifulsoup4,
pytestCheckHook,
pytest-django,
mkdocs,
}:
buildPythonPackage rec {
pname = "django-pattern-library";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "torchbox";
repo = "django-pattern-library";
tag = "v${version}";
hash = "sha256-urK34rlBU5GuEOlUtmJLGv6wlTP5H/RMAkwQu5S2Jbo=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
django
pyyaml
markdown
];
nativeCheckInputs = [
beautifulsoup4
pytestCheckHook
pytest-django
mkdocs # only needed for jinja2, we don't build docs
];
env.DJANGO_SETTINGS_MODULE = "tests.settings.dev";
pythonImportsCheck = [ "pattern_library" ];
meta = {
description = "UI pattern libraries for Django templates";
homepage = "https://github.com/torchbox/django-pattern-library/";
changelog = "https://github.com/torchbox/django-pattern-library/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ sephi ];
};
}