9 stdenv.mkDerivation (finalAttrs: {
10 pname = "voicevox-core";
13 src = finalAttrs.passthru.sources.${stdenv.hostPlatform.system};
15 nativeBuildInputs = [ unzip ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
17 buildInputs = [ stdenv.cc.cc.lib ];
22 install -Dm755 libonnxruntime.* libvoicevox_core.* -t $out/lib
23 install -Dm644 model/* -t $out/lib/model
24 install -Dm644 *.h -t $out/include
25 install -Dm644 README.txt -t $out/share/doc/voicevox-core
30 # When updating, run the following command to fetch all FODs:
31 # nix-build -A voicevox-core.sources --keep-going
34 # Note: Only the prebuilt binaries are able to decrypt the encrypted voice models
38 url = "https://github.com/VOICEVOX/voicevox_core/releases/download/${finalAttrs.version}/voicevox_core-${id}-cpu-${finalAttrs.version}.zip";
43 "x86_64-linux" = fetchCoreArtifact {
45 hash = "sha256-7FgrJ1HlB8l5MHd2KM4lYRx2bYdxrD2+su1G33/ugUA=";
47 "aarch64-linux" = fetchCoreArtifact {
49 hash = "sha256-fD7YMTo9jeB4vJibnVwX8VrukCUeAwS6VXGOr3VXG+c=";
51 "x86_64-darwin" = fetchCoreArtifact {
53 hash = "sha256-5h9qEKbdcvip50TLs3vf6lXkSv24VEjOrx6CTUo7Q4Q=";
55 "aarch64-darwin" = fetchCoreArtifact {
57 hash = "sha256-0bFLhvP7LqDzuk3pyM9QZfc8eLMW0IgqVkaXsuS3qlY=";
62 changelog = "https://github.com/VOICEVOX/voicevox_core/releases/tag/${finalAttrs.version}";
63 description = "Core library for the VOICEVOX speech synthesis software";
64 homepage = "https://github.com/VOICEVOX/voicevox_core";
65 license = with lib.licenses; [
68 name = "VOICEVOX Core Library Terms of Use";
69 url = "https://github.com/VOICEVOX/voicevox_resource/blob/main/core/README.md";
71 redistributable = true;
74 maintainers = with lib.maintainers; [
78 platforms = lib.attrNames finalAttrs.passthru.sources;
79 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];