From cdb28fe5f46ef0b7147de0477f9f52f161cb7508 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 24 Jul 2026 03:54:12 +0700 Subject: [PATCH 1/3] python3Packages.three-merge: migrate to pyproject --- pkgs/development/python-modules/three-merge/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/three-merge/default.nix b/pkgs/development/python-modules/three-merge/default.nix index c4df05cf3d58..49e87ae61b87 100644 --- a/pkgs/development/python-modules/three-merge/default.nix +++ b/pkgs/development/python-modules/three-merge/default.nix @@ -2,20 +2,23 @@ lib, buildPythonPackage, fetchPypi, + setuptools, diff-match-patch, }: buildPythonPackage rec { pname = "three-merge"; version = "0.1.1"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "0w6rv7rv1zm901wbjkmm6d3vkwyf3csja9p37bb60mar8khszxk0"; }; - propagatedBuildInputs = [ diff-match-patch ]; + build-system = [ setuptools ]; + + dependencies = [ diff-match-patch ]; pythonImportsCheck = [ "three_merge" ]; From 5c1c2a4250d76734e12c671745910613daa95b14 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 24 Jul 2026 04:00:48 +0700 Subject: [PATCH 2/3] python3Packages.three-merge: modernize --- .../python-modules/three-merge/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/three-merge/default.nix b/pkgs/development/python-modules/three-merge/default.nix index 49e87ae61b87..c6279b9d9226 100644 --- a/pkgs/development/python-modules/three-merge/default.nix +++ b/pkgs/development/python-modules/three-merge/default.nix @@ -6,14 +6,17 @@ diff-match-patch, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "three-merge"; version = "0.1.1"; pyproject = true; + __structuredAttrs = true; + src = fetchPypi { - inherit pname version; - sha256 = "0w6rv7rv1zm901wbjkmm6d3vkwyf3csja9p37bb60mar8khszxk0"; + pname = "three-merge"; + inherit (finalAttrs) version; + hash = "sha256-YPav4URZVWDWOuMmJTUbzvO5RzO1Trl4AKn+sPPZ2XA="; }; build-system = [ setuptools ]; @@ -28,4 +31,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = [ ]; }; -} +}) From 124549c98ec3ce369ef9c847473fabf3cd07d40b Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 31 Jul 2026 20:41:21 +0700 Subject: [PATCH 3/3] python3Packages.three-merge: enable tests --- .../python-modules/three-merge/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/three-merge/default.nix b/pkgs/development/python-modules/three-merge/default.nix index c6279b9d9226..37d3cabdf405 100644 --- a/pkgs/development/python-modules/three-merge/default.nix +++ b/pkgs/development/python-modules/three-merge/default.nix @@ -1,9 +1,10 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, setuptools, diff-match-patch, + pytestCheckHook, }: buildPythonPackage (finalAttrs: { @@ -13,16 +14,20 @@ buildPythonPackage (finalAttrs: { __structuredAttrs = true; - src = fetchPypi { - pname = "three-merge"; - inherit (finalAttrs) version; - hash = "sha256-YPav4URZVWDWOuMmJTUbzvO5RzO1Trl4AKn+sPPZ2XA="; + # pypi does not contain test files + src = fetchFromGitHub { + owner = "spyder-ide"; + repo = "three-merge"; + tag = "v${finalAttrs.version}"; + hash = "sha256-BtWgBOSddLB7mQoc8vhGKxBBkdnvyASyrwRLA7lGgrs="; }; build-system = [ setuptools ]; dependencies = [ diff-match-patch ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "three_merge" ]; meta = {