diff --git a/pkgs/development/python-modules/sudachidict/default.nix b/pkgs/development/python-modules/sudachidict/default.nix index 72826908612c7..41a359110474f 100644 --- a/pkgs/development/python-modules/sudachidict/default.nix +++ b/pkgs/development/python-modules/sudachidict/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , sudachidict , setuptools +, sudachipy }: buildPythonPackage rec { @@ -33,6 +34,10 @@ buildPythonPackage rec { setuptools ]; + propagatedBuildInputs = [ + sudachipy + ]; + # we need to prepare some files before the build # https://github.com/WorksApplications/SudachiDict/blob/develop/package_python.sh preBuild = '' diff --git a/pkgs/development/python-modules/sudachipy/default.nix b/pkgs/development/python-modules/sudachipy/default.nix index 04460f5274c13..3e3bd5b4adf65 100644 --- a/pkgs/development/python-modules/sudachipy/default.nix +++ b/pkgs/development/python-modules/sudachipy/default.nix @@ -10,6 +10,7 @@ , pytestCheckHook , sudachidict-core , tokenizers +, sudachipy }: buildPythonPackage rec { @@ -37,6 +38,9 @@ buildPythonPackage rec { cd python ''; + # avoid infinite recursion due to sudachidict + doCheck = false; + nativeCheckInputs = [ pytestCheckHook sudachidict-core @@ -49,6 +53,16 @@ buildPythonPackage rec { passthru = { inherit (sudachi-rs) updateScript; + tests = { + pytest = sudachipy.overridePythonAttrs ( + _: { + doCheck = true; + # avoid catchConflicts of sudachipy + # we don't need to install this package since it is just a test + dontInstall = true; + } + ); + }; }; meta = sudachi-rs.meta // {