Skip to content

Commit

Permalink
python311Packages.sudachi-dict: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium committed Jan 23, 2024
1 parent ea1c112 commit 39d2a72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/sudachidict/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, fetchFromGitHub
, sudachidict
, setuptools
, sudachipy
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -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 = ''
Expand Down
14 changes: 14 additions & 0 deletions pkgs/development/python-modules/sudachipy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
, pytestCheckHook
, sudachidict-core
, tokenizers
, sudachipy
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -37,6 +38,9 @@ buildPythonPackage rec {
cd python
'';

# avoid infinite recursion due to sudachidict
doCheck = false;

nativeCheckInputs = [
pytestCheckHook
sudachidict-core
Expand All @@ -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 // {
Expand Down

0 comments on commit 39d2a72

Please sign in to comment.