depot/third_party/nixpkgs/pkgs/development/python-modules/jsonschema-spec/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

69 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build
poetry-core,
# propagates
pathable,
pyyaml,
referencing,
requests,
# tests
pytestCheckHook,
responses,
}:
buildPythonPackage rec {
pname = "jsonschema-spec";
version = "0.3.3";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "p1c2u";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-oBzB6Ke19QDcMQm4MpnaS132/prrtnCekAXuPMloZx4=";
};
postPatch = ''
sed -i "/^--cov/d" pyproject.toml
substituteInPlace pyproject.toml \
--replace 'referencing = ">=0.28.0,<0.30.0"' 'referencing = ">=0.28.0"'
'';
nativeBuildInputs = [
poetry-core
];
pythonRelaxDeps = [ "referencing" ];
propagatedBuildInputs = [
pathable
pyyaml
referencing
requests
];
nativeCheckInputs = [
pytestCheckHook
responses
];
passthru.skipBulkUpdate = true; # newer versions under the jsonschema-path name
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 ];
};
}