2022-06-13 17:25:39 +02:00
|
|
|
{ lib
|
2023-03-13 12:27:17 +01:00
|
|
|
, stdenv
|
2022-06-13 17:25:39 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-03-13 12:27:17 +01:00
|
|
|
, iconv
|
2022-06-13 17:25:39 +02:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2023-01-10 21:09:33 -05:00
|
|
|
, json-stream-rs-tokenizer
|
2022-09-16 18:52:45 +02:00
|
|
|
, setuptools
|
2022-06-13 17:25:39 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "json-stream";
|
2023-08-17 00:54:57 +02:00
|
|
|
version = "2.3.2";
|
2022-06-13 17:25:39 +02:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-17 00:54:57 +02:00
|
|
|
hash = "sha256-uLRQ6o6OPCOenn440S/tk053o1PBSyl/juNFpc6yW5E=";
|
2022-06-13 17:25:39 +02:00
|
|
|
};
|
|
|
|
|
2022-09-16 18:52:45 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-03-13 12:27:17 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
iconv
|
|
|
|
];
|
|
|
|
|
2022-06-13 17:25:39 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
2023-01-10 21:09:33 -05:00
|
|
|
json-stream-rs-tokenizer
|
2022-06-13 17:25:39 +02:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-13 17:25:39 +02:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"json_stream"
|
|
|
|
];
|
|
|
|
|
2022-09-24 23:30:25 +02:00
|
|
|
disabledTests = [
|
|
|
|
"test_writer"
|
|
|
|
];
|
|
|
|
|
2022-06-13 17:25:39 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Streaming JSON parser";
|
|
|
|
homepage = "https://github.com/daggaz/json-stream";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|