1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 jsonschema,
7 pytestCheckHook,
8 python-dateutil,
9 setuptools,
10 wheel,
11}:
12
13buildPythonPackage rec {
14 pname = "hologram";
15 version = "0.0.16";
16 format = "pyproject";
17
18 src = fetchFromGitHub {
19 owner = "dbt-labs";
20 repo = "hologram";
21 tag = "v${version}";
22 hash = "sha256-DboVCvByI8bTThamGBwSiQADGxIaEnTMmwmVI+4ARgc=";
23 };
24
25 patches = [
26 # https://github.com/dbt-labs/hologram/pull/58
27 (fetchpatch {
28 name = "python3.11-test-compatibility.patch";
29 url = "https://github.com/dbt-labs/hologram/commit/84bbe862ef6a2fcc8b8ce85b5c9a006cc7dc1f66.patch";
30 hash = "sha256-t096jJDoKUPED4QHSfVjUMLtUJjWcqjblCtGR8moEJc=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 setuptools
36 wheel
37 ];
38
39 propagatedBuildInputs = [
40 jsonschema
41 python-dateutil
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 pythonRelaxDeps = [ "python-dateutil" ];
47
48 pythonImportsCheck = [ "hologram" ];
49
50 meta = with lib; {
51 description = "Library for automatically generating Draft 7 JSON Schemas from Python dataclasses";
52 homepage = "https://github.com/dbt-labs/hologram";
53 license = licenses.mit;
54 maintainers = with maintainers; [
55 mausch
56 tjni
57 ];
58 };
59}