nixpkgs/pkgs/development/tools/check-jsonschema/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.2 KiB
Nix
Raw Normal View History

2022-07-03 14:49:11 +00:00
{ lib, fetchFromGitHub, python3 }:
with python3.pkgs;
buildPythonApplication rec {
pname = "check-jsonschema";
2022-09-19 01:43:58 +00:00
version = "0.18.3";
2022-07-03 14:49:11 +00:00
src = fetchFromGitHub {
owner = "python-jsonschema";
repo = "check-jsonschema";
rev = version;
2022-09-19 01:43:58 +00:00
sha256 = "sha256-9Ejcxr/22rJu8JoC7WspLfzF08elz4TaGagDeV0zIXk=";
2022-07-03 14:49:11 +00:00
};
propagatedBuildInputs = [
ruamel-yaml
jsonschema
identify
requests
click
];
checkInputs = [
pytestCheckHook
pytest-xdist
responses
];
2022-09-19 01:43:58 +00:00
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"
];
2022-07-03 14:49:11 +00:00
preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
# https://github.com/python/cpython/issues/74570#issuecomment-1093748531
export no_proxy='*';
'';
meta = with lib; {
description = "A jsonschema CLI and pre-commit hook";
homepage = "https://github.com/python-jsonschema/check-jsonschema";
license = licenses.apsl20;
maintainers = with maintainers; [ sudosubin ];
};
}