1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 fetchpatch,
5 lib,
6
7 # build-system
8 poetry-core,
9
10 # dependencies
11 django,
12 markdown,
13 pyyaml,
14
15 # tests
16 beautifulsoup4,
17 pytestCheckHook,
18 pytest-django,
19}:
20
21buildPythonPackage rec {
22 pname = "django-pattern-library";
23 version = "1.2.0";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "torchbox";
28 repo = "django-pattern-library";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-hrdJYVioY6y9D29DuKPMZjdWj92GcbHXANWiEHadimI=";
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 ];
46
47 env.DJANGO_SETTINGS_MODULE = "tests.settings.dev";
48
49 pythonImportsCheck = [ "pattern_library" ];
50
51 meta = with lib; {
52 description = "UI pattern libraries for Django templates";
53 homepage = "https://github.com/torchbox/django-pattern-library/";
54 changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ sephi ];
57 };
58}