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 " ;
2023-03-04 12:14:45 +00:00
version = " 0 . 2 1 . 0 " ;
format = " s e t u p t o o l s " ;
disabled = pythonOlder " 3 . 7 " ;
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 ;
2023-03-04 12:14:45 +00:00
hash = " s h a 2 5 6 - 7 c X n V 2 7 L C G 1 M X D H 2 8 U B m U C 4 s L o o H 2 g K v G Y F 3 Y i j L B 3 8 = " ;
2022-07-14 12:49:19 +00:00
} ;
propagatedBuildInputs = [
ruamel-yaml
jsonschema
requests
click
] ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2022-07-14 12:49:19 +00:00
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 = ' * ' ;
'' ;
2023-03-04 12:14:45 +00:00
pythonImportsCheck = [
" c h e c k _ 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 . c l i "
] ;
2022-07-14 12:49:19 +00:00
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 " ;
2023-03-04 12:14:45 +00:00
changelog = " 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 / b l o b / ${ version } / C H A N G E L O G . r s t " ;
2023-07-15 17:15:38 +00:00
license = licenses . asl20 ;
2022-07-14 12:49:19 +00:00
maintainers = with maintainers ; [ sudosubin ] ;
} ;
}