about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorOTABI Tomoya <tomoya.otabi@gmail.com>2024-01-25 10:41:32 +0900
committerGitHub <noreply@github.com>2024-01-25 10:41:32 +0900
commita89664f224e14ca95386443e8928257b7608d1dc (patch)
treea36af73cc33e267cf6925dd881bd2f9c31c1c6b6 /pkgs/development
parentd968b24ce177507f38008e12f01fba8763245e47 (diff)
parent39d2a724c9f380dcd20a52a04664766a5863563b (diff)
Merge pull request #283178 from natsukium/sudachi-rs/update
sudachi-rs: 0.6.7 -> 0.6.8; add updateScript
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/sudachidict/default.nix5
-rw-r--r--pkgs/development/python-modules/sudachipy/default.nix20
2 files changed, 24 insertions, 1 deletions
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 bfaf9be85846b..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 {
@@ -19,7 +20,7 @@ buildPythonPackage rec {
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     name = "${pname}-${version}";
-    hash = "sha256-Am+ae2lgnndSDzf0GF8R1i6OPLdIlm2dLThqYqXbscA=";
+    hash = "sha256-ARwvThfATDdzBTjPFr9yjbE/0eYvp/TCZOEGbUupJmU=";
   };
 
   nativeBuildInputs = [
@@ -37,6 +38,9 @@ buildPythonPackage rec {
     cd python
   '';
 
+  # avoid infinite recursion due to sudachidict
+  doCheck = false;
+
   nativeCheckInputs = [
     pytestCheckHook
     sudachidict-core
@@ -47,6 +51,20 @@ buildPythonPackage rec {
     "sudachipy"
   ];
 
+  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 // {
     homepage = "https://github.com/WorksApplications/sudachi.rs/tree/develop/python";
     mainProgram = "sudachipy";