From 69678414299e1c356157ba420f8ad99b06c07140 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 29 Sep 2024 17:05:08 +0200 Subject: [PATCH] python3Packages.jsondiff: 2.0.0 -> 2.2.1 --- .../python-modules/jsondiff/default.nix | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/jsondiff/default.nix b/pkgs/development/python-modules/jsondiff/default.nix index 5b5f67ce5264..2ddfd381f64d 100644 --- a/pkgs/development/python-modules/jsondiff/default.nix +++ b/pkgs/development/python-modules/jsondiff/default.nix @@ -1,25 +1,43 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + + # build-system + setuptools, + setuptools-scm, + + # dependencies + pyyaml, + + # tests + hypothesis, + pytestCheckHook, }: buildPythonPackage rec { pname = "jsondiff"; - version = "2.0.0"; - format = "setuptools"; + version = "2.2.1"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-J5WETvB17IorjThcTVn16kiwjnGA/OPLJ4e+DbALH7Q="; + src = fetchFromGitHub { + owner = "xlwings"; + repo = "jsondiff"; + rev = "refs/tags/${version}"; + hash = "sha256-0EnI7f5t7Ftl/8UcsRdA4iVQ78mxvPucCJjFJ8TMwww="; }; - postPatch = '' - sed -e "/'jsondiff=jsondiff.cli:main_deprecated',/d" -i setup.py - ''; + build-system = [ + setuptools + setuptools-scm + ]; - # No tests - doCheck = false; + dependencies = [ pyyaml ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + ]; meta = { description = "Diff JSON and JSON-like structures in Python";