2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchpatch
|
2023-08-04 22:07:22 +00:00
|
|
|
, jsonschema
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, setuptools
|
2023-08-10 07:59:29 +00:00
|
|
|
, wheel
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hologram";
|
|
|
|
version = "0.0.16";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbt-labs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-DboVCvByI8bTThamGBwSiQADGxIaEnTMmwmVI+4ARgc=";
|
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/dbt-labs/hologram/pull/58
|
|
|
|
(fetchpatch {
|
|
|
|
name = "python3.11-test-compatibility.patch";
|
|
|
|
url = "https://github.com/dbt-labs/hologram/commit/84bbe862ef6a2fcc8b8ce85b5c9a006cc7dc1f66.patch";
|
|
|
|
hash = "sha256-t096jJDoKUPED4QHSfVjUMLtUJjWcqjblCtGR8moEJc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-08-10 07:59:29 +00:00
|
|
|
wheel
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonschema
|
|
|
|
python-dateutil
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"hologram"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A library for automatically generating Draft 7 JSON Schemas from Python dataclasses";
|
|
|
|
homepage = "https://github.com/dbt-labs/hologram";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mausch tjni ];
|
|
|
|
};
|
|
|
|
}
|