From 36b15460c9428f29835fbf3475ade9937b1e2e6f Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Fri, 16 Aug 2024 19:53:43 +0200 Subject: [PATCH] python3Packages.jsonslicer: add tests and changelogs --- .../python-modules/jsonslicer/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jsonslicer/default.nix b/pkgs/development/python-modules/jsonslicer/default.nix index 8f5420d194c8..a7f79e849be3 100644 --- a/pkgs/development/python-modules/jsonslicer/default.nix +++ b/pkgs/development/python-modules/jsonslicer/default.nix @@ -3,6 +3,8 @@ buildPythonPackage, fetchFromGitHub, gitUpdater, + pytestCheckHook, + unittestCheckHook, setuptools, pkg-config, yajl, @@ -16,7 +18,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "AMDmi3"; repo = "jsonslicer"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-nPifyqr+MaFqoCYFbFSSBDjvifpX0CFnHCdMCvhwYTA="; }; @@ -27,11 +29,19 @@ buildPythonPackage rec { buildInputs = [ yajl ]; + nativeCheckInputs = [ + pytestCheckHook + unittestCheckHook + ]; + + pythonImportsCheck = [ "jsonslicer" ]; + passthru.updateScript = gitUpdater { }; meta = with lib; { description = "Stream JSON parser for Python"; homepage = "https://github.com/AMDmi3/jsonslicer"; + changelog = "https://github.com/AMDmi3/jsonslicer/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ jopejoe1 ]; };