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