From 8b99f7b59da2316ef6e1e2b08035549988807188 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 8 Jun 2023 20:14:37 +0200 Subject: [PATCH] python311Packages.ndjson: adjust inputs --- .../python-modules/ndjson/default.nix | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ndjson/default.nix b/pkgs/development/python-modules/ndjson/default.nix index 9f2cf3fb2b9b..4bd84a73be0a 100644 --- a/pkgs/development/python-modules/ndjson/default.nix +++ b/pkgs/development/python-modules/ndjson/default.nix @@ -1,21 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi, watchdog, flake8 -, pytest, pytest-runner, coverage, sphinx, twine }: +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, six +, watchdog +}: buildPythonPackage rec { pname = "ndjson"; version = "0.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "v5dGy2uxy1PRcs2n8VTAfHhtZl/yg0Hk5om3lrIp5dY="; + hash = "sha256-v5dGy2uxy1PRcs2n8VTAfHhtZl/yg0Hk5om3lrIp5dY="; }; - nativeCheckInputs = [ pytest pytest-runner flake8 twine sphinx coverage watchdog ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner', " "" + ''; + + nativeCheckInputs = [ + pytestCheckHook + six + watchdog + ]; + + pythonImportsCheck = [ + "ndjson" + ]; meta = with lib; { + description = "Module supports ndjson"; homepage = "https://github.com/rhgrant10/ndjson"; - description = "JsonDecoder"; - platforms = platforms.unix; + changelog = "https://github.com/rhgrant10/ndjson/blob/v${version}/HISTORY.rst"; license = licenses.gpl3Only; maintainers = with maintainers; [ freezeboy ]; };