2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# build
|
2022-09-30 11:47:45 +00:00
|
|
|
, poetry-core
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# propagates
|
2022-09-30 11:47:45 +00:00
|
|
|
, pathable
|
|
|
|
, pyyaml
|
2023-08-10 07:59:29 +00:00
|
|
|
, referencing
|
|
|
|
, requests
|
|
|
|
|
|
|
|
# tests
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytestCheckHook
|
2023-08-10 07:59:29 +00:00
|
|
|
, responses
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jsonschema-spec";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.2.4";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "p1c2u";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-1Flb3XQCGhrAYzTvriSVhHDb/Z/uvCyZdbav2u7f3sg=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-08-10 07:59:29 +00:00
|
|
|
sed -i "/^--cov/d" pyproject.toml
|
|
|
|
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'referencing = ">=0.28.0,<0.30.0"' 'referencing = ">=0.28.0"'
|
2022-09-30 11:47:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-01-13 08:15:51 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"referencing"
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pathable
|
|
|
|
pyyaml
|
2023-08-10 07:59:29 +00:00
|
|
|
referencing
|
|
|
|
requests
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
pytestCheckHook
|
2023-08-10 07:59:29 +00:00
|
|
|
responses
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/p1c2u/jsonschema-spec/releases/tag/${version}";
|
|
|
|
description = "JSONSchema Spec with object-oriented paths";
|
|
|
|
homepage = "https://github.com/p1c2u/jsonschema-spec";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|