diff --git a/pkgs/development/python-modules/editdistpy/default.nix b/pkgs/development/python-modules/editdistpy/default.nix index cf97a6dd2272..49fc36e69254 100644 --- a/pkgs/development/python-modules/editdistpy/default.nix +++ b/pkgs/development/python-modules/editdistpy/default.nix @@ -1,20 +1,17 @@ { lib, buildPythonPackage, - fetchFromGitHub, - - pytestCheckHook, - cython, - pkg-resources-backport, - setuptools, - - symspellpy, - numpy, editdistpy, + fetchFromGitHub, + numpy, + pkg-resources-backport, + pytestCheckHook, + setuptools, + symspellpy, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "editdistpy"; version = "0.1.6"; pyproject = true; @@ -22,7 +19,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "mammothb"; repo = "editdistpy"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-bUdwhMFDIhHuIlcqIZt6mSh8xwW/2igw0QiWGvQBLC8="; }; @@ -32,9 +29,6 @@ buildPythonPackage rec { setuptools ]; - # error: infinite recursion encountered - doCheck = false; - nativeCheckInputs = [ pytestCheckHook symspellpy @@ -45,6 +39,9 @@ buildPythonPackage rec { rm -r editdistpy ''; + # error: infinite recursion encountered + doCheck = false; + passthru.tests = { check = editdistpy.overridePythonAttrs (_: { doCheck = true; @@ -56,8 +53,8 @@ buildPythonPackage rec { meta = { description = "Fast Levenshtein and Damerau optimal string alignment algorithms"; homepage = "https://github.com/mammothb/editdistpy"; - changelog = "https://github.com/mammothb/editdistpy/releases/tag/${src.tag}"; + changelog = "https://github.com/mammothb/editdistpy/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ vizid ]; }; -} +})