1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 httpx, 7 iconv, 8 pytestCheckHook, 9 pythonOlder, 10 requests, 11 json-stream-rs-tokenizer, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "json-stream"; 17 version = "2.3.3"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "daggaz"; 24 repo = "json-stream"; 25 tag = "v${version}"; 26 hash = "sha256-/GDEC/Poy84TGuXM34OW4+K/qMJELFfO+lNQ5M5VsdI="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ json-stream-rs-tokenizer ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ iconv ]; 32 33 optional-dependencies = { 34 httpx = [ httpx ]; 35 requests = [ requests ]; 36 }; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 pythonImportsCheck = [ "json_stream" ]; 41 42 disabledTests = [ "test_writer" ]; 43 44 meta = with lib; { 45 description = "Streaming JSON parser"; 46 homepage = "https://github.com/daggaz/json-stream"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}