diff options
author | natsukium <tomoya.otabi@gmail.com> | 2023-11-05 18:25:02 +0900 |
---|---|---|
committer | natsukium <tomoya.otabi@gmail.com> | 2023-11-06 10:36:51 +0900 |
commit | e2fb2e8087637a482eb222a81a0af642b357334a (patch) | |
tree | 8873c3410c734e7af967d0135ad331758d9715dd /pkgs/by-name/su | |
parent | 969737812c00bc8668935acd26b6e64d8321f4f2 (diff) |
sudachidict: init at 20230927
Diffstat (limited to 'pkgs/by-name/su')
-rw-r--r-- | pkgs/by-name/su/sudachidict/package.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/by-name/su/sudachidict/package.nix b/pkgs/by-name/su/sudachidict/package.nix new file mode 100644 index 0000000000000..7245b9696bf2a --- /dev/null +++ b/pkgs/by-name/su/sudachidict/package.nix @@ -0,0 +1,60 @@ +{ lib +, stdenvNoCC +, fetchzip +, dict-type ? "core" +}: + +let + pname = "sudachidict"; + version = "20230927"; + + srcs = { + core = fetchzip { + url = "https://github.com/WorksApplications/SudachiDict/releases/download/v${version}/sudachi-dictionary-${version}-core.zip"; + hash = "sha256-c88FfC03AU8eP37RVu9M3BAIlwFlTJqQJ60PK94mHOc="; + }; + small = fetchzip { + url = "https://github.com/WorksApplications/SudachiDict/releases/download/v${version}/sudachi-dictionary-${version}-small.zip"; + hash = "sha256-eaYD2C/qPeZJvmOeqH307a6OXtYfuksf6VZt+9kM7eM="; + }; + full = fetchzip { + url = "https://github.com/WorksApplications/SudachiDict/releases/download/v${version}/sudachi-dictionary-${version}-full.zip"; + hash = "sha256-yiO33UUQHcf6LvHJ1Is4MJtI5GSHuIP/tsE9m/KZ01o="; + }; + }; +in + +lib.checkListOfEnum "${pname}: dict-type" [ "core" "full" "small" ] [ dict-type ] + +stdenvNoCC.mkDerivation { + inherit pname version; + + src = srcs.${dict-type}; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + install -Dm644 system_${dict-type}.dic $out/share/system.dic + + runHook postInstall + ''; + + passthru = { + dict-type = dict-type; + }; + + meta = with lib; { + description = "A lexicon for Sudachi"; + homepage = "https://github.com/WorksApplications/SudachiDict"; + changelog = "https://github.com/WorksApplications/SudachiDict/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ natsukium ]; + platforms = platforms.all; + # it is a waste of space and time to build this package in hydra since it is just data + hydraPlatforms = []; + }; +} |