9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ lib, fetchFromGitHub, python3 }:
|
|
|
|
with python3.pkgs;
|
|
|
|
buildPythonApplication rec {
|
|
pname = "check-jsonschema";
|
|
version = "0.21.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "python-jsonschema";
|
|
repo = "check-jsonschema";
|
|
rev = version;
|
|
hash = "sha256-7cXnV27LCG1MXDH28UBmUC4sLooH2gKvGYF3YijLB38=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
ruamel-yaml
|
|
jsonschema
|
|
requests
|
|
click
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-xdist
|
|
responses
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
# DeprecationWarning: Accessing jsonschema.draft3_format_checker is deprecated and will be removed in a future release. Instead, use the FORMAT_CHECKER attribute on the corresponding Validator.
|
|
"-W" "ignore::DeprecationWarning"
|
|
];
|
|
|
|
preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
|
# https://github.com/python/cpython/issues/74570#issuecomment-1093748531
|
|
export no_proxy='*';
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"check_jsonschema"
|
|
"check_jsonschema.cli"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A jsonschema CLI and pre-commit hook";
|
|
homepage = "https://github.com/python-jsonschema/check-jsonschema";
|
|
changelog = "https://github.com/python-jsonschema/check-jsonschema/blob/${version}/CHANGELOG.rst";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ sudosubin ];
|
|
};
|
|
}
|