Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / fastjsonschema / default.nix
blob330bf096b2cee279add2be1ba8e0057ebd872fc3
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch2
6 , pytestCheckHook
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "fastjsonschema";
12   version = "2.19.1";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "horejsek";
19     repo = "python-fastjsonschema";
20     rev = "v${version}";
21     fetchSubmodules = true;
22     hash = "sha256-UxcxVB4ldnGAYJKWEccivon1CwZD588mNiVJOJPNeN8=";
23   };
25   patches = [
26     (fetchpatch2 {
27       name = "fastjsonschema-pytest8-compat.patch";
28       url = "https://github.com/horejsek/python-fastjsonschema/commit/efc04daf4124a598182dfcfd497615cd1e633d18.patch";
29       hash = "sha256-G1/PIpdN+KFfRP9pUFf/ANXLq3mzrocEHyBNWQMVOZM=";
30     })
31   ];
33   nativeCheckInputs = [
34     pytestCheckHook
35   ];
37   dontUseSetuptoolsCheck = true;
39   disabledTests = [
40     "benchmark"
41     # these tests require network access
42     "remote ref"
43     "definitions"
44   ] ++ lib.optionals stdenv.isDarwin [
45     "test_compile_to_code_custom_format"  # cannot import temporary module created during test
46   ];
48   pythonImportsCheck = [
49     "fastjsonschema"
50   ];
52   meta = with lib; {
53     description = "JSON schema validator for Python";
54     homepage = "https://horejsek.github.io/python-fastjsonschema/";
55     license = licenses.bsd3;
56     maintainers = with maintainers; [ drewrisinger ];
57   };