Files
nixpkgs/pkgs/development/python-modules/json-stream/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

48 lines
965 B
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
httpx,
iconv,
pytestCheckHook,
requests,
json-stream-rs-tokenizer,
setuptools,
}:
buildPythonPackage rec {
pname = "json-stream";
version = "2.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "daggaz";
repo = "json-stream";
tag = "v${version}";
hash = "sha256-oZYVRgDSl15/UJmhTAoLk3UoVimQeLGNOjNXLH6GTtY=";
};
build-system = [ setuptools ];
dependencies = [ json-stream-rs-tokenizer ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ iconv ];
optional-dependencies = {
httpx = [ httpx ];
requests = [ requests ];
};
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "json_stream" ];
disabledTests = [ "test_writer" ];
meta = {
description = "Streaming JSON parser";
homepage = "https://github.com/daggaz/json-stream";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}