2023-11-16 04:20:00 +00:00
|
|
|
{ buildPythonPackage
|
2023-03-30 22:05:00 +00:00
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchpatch
|
2023-03-30 22:05:00 +00:00
|
|
|
, lib
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# build-system
|
2023-03-30 22:05:00 +00:00
|
|
|
, poetry-core
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, django
|
|
|
|
, markdown
|
2023-03-30 22:05:00 +00:00
|
|
|
, pyyaml
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, beautifulsoup4
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-django
|
2023-03-30 22:05:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-pattern-library";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.0.1";
|
2023-03-30 22:05:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "torchbox";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "django-pattern-library";
|
2023-03-30 22:05:00 +00:00
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-Q8rv7RDlstTSlwmbmHV0vrnCV/lwz6VJf27BUllA34Y=";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/torchbox/django-pattern-library/pull/232
|
|
|
|
url = "https://github.com/torchbox/django-pattern-library/commit/e7a9a8928a885941391fb584eba81578a292ee7d.patch";
|
|
|
|
hash = "sha256-3uUoxdVYEiF+to88qZRhOkh1++RfmsqCzO9JNMDqz6g=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
pyyaml
|
|
|
|
markdown
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-30 22:05:00 +00:00
|
|
|
beautifulsoup4
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
2023-03-30 22:05:00 +00:00
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.settings.dev";
|
2023-03-30 22:05:00 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "pattern_library" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "UI pattern libraries for Django templates";
|
|
|
|
homepage = "https://github.com/torchbox/django-pattern-library/";
|
|
|
|
changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ sephi ];
|
|
|
|
};
|
|
|
|
}
|