diff options
Diffstat (limited to 'pkgs/by-name/su/sudachi-rs/package.nix')
-rw-r--r-- | pkgs/by-name/su/sudachi-rs/package.nix | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/by-name/su/sudachi-rs/package.nix b/pkgs/by-name/su/sudachi-rs/package.nix index f55a24e41e79..24ae7a9873e8 100644 --- a/pkgs/by-name/su/sudachi-rs/package.nix +++ b/pkgs/by-name/su/sudachi-rs/package.nix @@ -4,17 +4,18 @@ , sudachidict , runCommand , sudachi-rs +, writeScript }: rustPlatform.buildRustPackage rec { pname = "sudachi-rs"; - version = "0.6.7"; + version = "0.6.8"; src = fetchFromGitHub { owner = "WorksApplications"; repo = "sudachi.rs"; rev = "refs/tags/v${version}"; - hash = "sha256-VzNOI6PP9sKBsNfB5yIxAI8jI8TEdM4tD49Jl/2tkSE="; + hash = "sha256-9GXU+YDPuQ+roqQfUE5q17Hl6AopsvGhRPjZ+Ui+n24="; }; postPatch = '' @@ -22,7 +23,7 @@ rustPlatform.buildRustPackage rec { --replace '"resources"' '"${placeholder "out"}/share/resources"' ''; - cargoHash = "sha256-b2NtgHcMkimzFFuqohAo9KdSaIq6oi3qo/k8/VugyFs="; + cargoHash = "sha256-Ufo3dB2KGDDNiebp7hLhQrUMLsefO8wRpJQDz57Yb8Y="; # prepare the resources before the build so that the binary can find sudachidict preBuild = '' @@ -30,12 +31,22 @@ rustPlatform.buildRustPackage rec { install -Dm644 resources/* -t $out/share/resources ''; - passthru.tests = { - # detects an error that sudachidict is not found - cli = runCommand "${pname}-cli-test" { } '' - mkdir $out - echo "高輪ゲートウェイ駅" | ${lib.getExe sudachi-rs} > $out/result + passthru = { + updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p nix-update + + set -eu -o pipefail + nix-update sudachi-rs + nix-update --version=skip python3Packages.sudachipy ''; + tests = { + # detects an error that sudachidict is not found + cli = runCommand "${pname}-cli-test" { } '' + mkdir $out + echo "高輪ゲートウェイ駅" | ${lib.getExe sudachi-rs} > $out/result + ''; + }; }; meta = with lib; { |