1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 django,
7 weasyprint,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "django-weasyprint";
13 version = "2.4.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "fdemmer";
18 repo = "django-weasyprint";
19 tag = "v${version}";
20 hash = "sha256-eSh1p+5MyYb6GIEgSdlFxPzVCenlkwSCTkTzgKjezIg=";
21 };
22
23 build-system = [
24 setuptools
25 ];
26
27 dependencies = [
28 django
29 weasyprint
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [ "django_weasyprint" ];
37
38 meta = {
39 description = "Django class-based view generating PDF resposes using WeasyPrint";
40 homepage = "https://github.com/fdemmer/django-weasyprint";
41 changelog = "https://github.com/fdemmer/django-weasyprint/releases/tag/${src.tag}";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [ hoh ];
44 };
45}