2022-07-14 12:49:19 +00:00
{ lib , fetchFromGitHub , python3 }:
with python3 . pkgs ;
buildPythonApplication rec {
pname = " c h e c k - j s o n s c h e m a " ;
2022-09-30 11:47:45 +00:00
version = " 0 . 1 8 . 3 " ;
2022-07-14 12:49:19 +00:00
src = fetchFromGitHub {
owner = " p y t h o n - j s o n s c h e m a " ;
repo = " c h e c k - j s o n s c h e m a " ;
rev = version ;
2022-09-30 11:47:45 +00:00
sha256 = " s h a 2 5 6 - 9 E j c x r / 2 2 r J u 8 J o C 7 W s p L f z F 0 8 e l z 4 T a G a g D e V 0 z I X k = " ;
2022-07-14 12:49:19 +00:00
} ;
propagatedBuildInputs = [
ruamel-yaml
jsonschema
identify
requests
click
] ;
checkInputs = [
pytestCheckHook
pytest-xdist
responses
] ;
2022-09-30 11:47:45 +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 " " i g n o r e : : D e p r e c a t i o n W a r n i n g "
] ;
2022-07-14 12:49:19 +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 j s o n s c h e m a C L I a n d p r e - c o m m i t h o o k " ;
homepage = " h t t p s : / / g i t h u b . c o m / p y t h o n - j s o n s c h e m a / c h e c k - j s o n s c h e m a " ;
license = licenses . apsl20 ;
maintainers = with maintainers ; [ sudosubin ] ;
} ;
}