2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
jsonschema,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
setuptools,
|
|
|
|
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 = [
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-08-04 22:07:22 +00:00
|
|
|
setuptools
|
2023-08-10 07:59:29 +00:00
|
|
|
wheel
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jsonschema
|
|
|
|
python-dateutil
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "python-dateutil" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "hologram" ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for automatically generating Draft 7 JSON Schemas from Python dataclasses";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/dbt-labs/hologram";
|
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
mausch
|
|
|
|
tjni
|
|
|
|
];
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
}
|