Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "fastjsonschema"; 11 version = "2.16.2"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "horejsek"; 18 repo = "python-fastjsonschema"; 19 rev = "v${version}"; 20 fetchSubmodules = true; 21 hash = "sha256-Gojayel/xQ5gRI0nbwsroeSMdRndjb+8EniX1Qs4nbg="; 22 }; 23 24 nativeCheckInputs = [ 25 pytestCheckHook 26 ]; 27 28 dontUseSetuptoolsCheck = true; 29 30 disabledTests = [ 31 "benchmark" 32 # these tests require network access 33 "remote ref" 34 "definitions" 35 ] ++ lib.optionals stdenv.isDarwin [ 36 "test_compile_to_code_custom_format" # cannot import temporary module created during test 37 ]; 38 39 pythonImportsCheck = [ 40 "fastjsonschema" 41 ]; 42 43 meta = with lib; { 44 description = "JSON schema validator for Python"; 45 homepage = "https://horejsek.github.io/python-fastjsonschema/"; 46 license = licenses.bsd3; 47 maintainers = with maintainers; [ drewrisinger ]; 48 }; 49}