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