blob: 00b6fe9c978f6067c51cebd778b346af237da9ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{ beautifulsoup4
, buildPythonPackage
, django
, fetchFromGitHub
, lib
, markdown
, poetry-core
, python
, pyyaml
}:
buildPythonPackage rec {
pname = "django-pattern-library";
version = "1.0.0";
format = "pyproject";
src = fetchFromGitHub {
repo = pname;
owner = "torchbox";
rev = "v${version}";
sha256 = "sha256-V299HpbfNLa9cpVhBfzD41oe95xqh+ktQVMMVvm5Xao=";
};
propagatedBuildInputs = [
django
pyyaml
markdown
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api
'';
nativeBuildInputs = [ poetry-core ];
checkInputs = [
beautifulsoup4
];
checkPhase = ''
export DJANGO_SETTINGS_MODULE=tests.settings.dev
${python.interpreter} -m django test
'';
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 ];
# https://github.com/torchbox/django-pattern-library/issues/212
broken = lib.versionAtLeast django.version "4.2";
};
}
|