1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5
6 # build-system
7 poetry-core,
8
9 # dependencies
10 django,
11 markdown,
12 pyyaml,
13
14 # tests
15 beautifulsoup4,
16 pytestCheckHook,
17 pytest-django,
18 mkdocs,
19}:
20
21buildPythonPackage rec {
22 pname = "django-pattern-library";
23 version = "1.5.0";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "torchbox";
28 repo = "django-pattern-library";
29 tag = "v${version}";
30 hash = "sha256-urK34rlBU5GuEOlUtmJLGv6wlTP5H/RMAkwQu5S2Jbo=";
31 };
32
33 nativeBuildInputs = [ poetry-core ];
34
35 propagatedBuildInputs = [
36 django
37 pyyaml
38 markdown
39 ];
40
41 nativeCheckInputs = [
42 beautifulsoup4
43 pytestCheckHook
44 pytest-django
45 mkdocs # only needed for jinja2, we don't build docs
46 ];
47
48 env.DJANGO_SETTINGS_MODULE = "tests.settings.dev";
49
50 pythonImportsCheck = [ "pattern_library" ];
51
52 meta = with lib; {
53 description = "UI pattern libraries for Django templates";
54 homepage = "https://github.com/torchbox/django-pattern-library/";
55 changelog = "https://github.com/torchbox/django-pattern-library/blob/${src.tag}/CHANGELOG.md";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ sephi ];
58 };
59}