diff --git a/pkgs/development/python-modules/three-merge/default.nix b/pkgs/development/python-modules/three-merge/default.nix index c4df05cf3d58..37d3cabdf405 100644 --- a/pkgs/development/python-modules/three-merge/default.nix +++ b/pkgs/development/python-modules/three-merge/default.nix @@ -1,21 +1,32 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + setuptools, diff-match-patch, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "three-merge"; version = "0.1.1"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "0w6rv7rv1zm901wbjkmm6d3vkwyf3csja9p37bb60mar8khszxk0"; + __structuredAttrs = true; + + # pypi does not contain test files + src = fetchFromGitHub { + owner = "spyder-ide"; + repo = "three-merge"; + tag = "v${finalAttrs.version}"; + hash = "sha256-BtWgBOSddLB7mQoc8vhGKxBBkdnvyASyrwRLA7lGgrs="; }; - propagatedBuildInputs = [ diff-match-patch ]; + build-system = [ setuptools ]; + + dependencies = [ diff-match-patch ]; + + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "three_merge" ]; @@ -25,4 +36,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = [ ]; }; -} +})