Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / hologram / default.nix
blob005834fc99b8d31d0ce4c8d91dff12523ae20a78
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , jsonschema
6 , pytestCheckHook
7 , python-dateutil
8 , setuptools
9 , wheel
12 buildPythonPackage rec {
13   pname = "hologram";
14   version = "0.0.16";
15   format = "pyproject";
17   src = fetchFromGitHub {
18     owner = "dbt-labs";
19     repo = pname;
20     rev = "refs/tags/v${version}";
21     hash = "sha256-DboVCvByI8bTThamGBwSiQADGxIaEnTMmwmVI+4ARgc=";
22   };
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   ];
33   nativeBuildInputs = [
34     setuptools
35     wheel
36   ];
38   propagatedBuildInputs = [
39     jsonschema
40     python-dateutil
41   ];
43   nativeCheckInputs = [
44     pytestCheckHook
45   ];
47   pythonImportsCheck = [
48     "hologram"
49   ];
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   };