1{ buildPythonPackage 2, fetchFromGitHub 3, fetchpatch 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}: 19 20buildPythonPackage rec { 21 pname = "django-pattern-library"; 22 version = "1.0.1"; 23 format = "pyproject"; 24 25 src = fetchFromGitHub { 26 owner = "torchbox"; 27 repo = "django-pattern-library"; 28 rev = "v${version}"; 29 hash = "sha256-Q8rv7RDlstTSlwmbmHV0vrnCV/lwz6VJf27BUllA34Y="; 30 }; 31 32 patches = [ 33 (fetchpatch { 34 # https://github.com/torchbox/django-pattern-library/pull/232 35 url = "https://github.com/torchbox/django-pattern-library/commit/e7a9a8928a885941391fb584eba81578a292ee7d.patch"; 36 hash = "sha256-3uUoxdVYEiF+to88qZRhOkh1++RfmsqCzO9JNMDqz6g="; 37 }) 38 ]; 39 40 nativeBuildInputs = [ 41 poetry-core 42 ]; 43 44 propagatedBuildInputs = [ 45 django 46 pyyaml 47 markdown 48 ]; 49 50 nativeCheckInputs = [ 51 beautifulsoup4 52 pytestCheckHook 53 pytest-django 54 ]; 55 56 env.DJANGO_SETTINGS_MODULE = "tests.settings.dev"; 57 58 pythonImportsCheck = [ "pattern_library" ]; 59 60 meta = with lib; { 61 description = "UI pattern libraries for Django templates"; 62 homepage = "https://github.com/torchbox/django-pattern-library/"; 63 changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md"; 64 license = licenses.bsd3; 65 maintainers = with maintainers; [ sephi ]; 66 }; 67}