voicevox-engine: 0.22.2 -> 0.23.0; voicevox: 0.22.4 -> 0.23.0 (#385895)
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "voicevox-engine";
|
||||
version = "0.22.2";
|
||||
version = "0.23.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox_engine";
|
||||
tag = version;
|
||||
hash = "sha256-TZycd3xX5d4dNk4ze2JozyO7zDpGAuO+O7xHAx7QXUI=";
|
||||
hash = "sha256-kuWpLnDKRYcfV9FxYLeR6FmQFO2K12KxJx/Y/4MwhbM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -113,7 +113,7 @@ python3Packages.buildPythonApplication rec {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox_resource";
|
||||
tag = version;
|
||||
hash = "sha256-oeWJESm1v0wicAXXFAyZT8z4QRVv9c+3vsWksmuY5wY=";
|
||||
hash = "sha256-6pxx+ebNzXd3qbrFa4gfMDM2e5XANo3ZPzSAegKoJBE=";
|
||||
};
|
||||
|
||||
pyopenjtalk = python3Packages.callPackage ./pyopenjtalk.nix { };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/.env.production b/.env.production
|
||||
index 5b0dcb0..5848ccd 100644
|
||||
index cc5e2b9..29140f8 100644
|
||||
--- a/.env.production
|
||||
+++ b/.env.production
|
||||
@@ -4,7 +4,7 @@ VITE_DEFAULT_ENGINE_INFOS=`[
|
||||
@@ -12,10 +12,10 @@ index 5b0dcb0..5848ccd 100644
|
||||
"host": "http://127.0.0.1:50021"
|
||||
}
|
||||
diff --git a/electron-builder.config.js b/electron-builder.config.js
|
||||
index 196a0d7..7e313c2 100644
|
||||
index 10bd7dc..4597b23 100644
|
||||
--- a/electron-builder.config.js
|
||||
+++ b/electron-builder.config.js
|
||||
@@ -37,18 +37,7 @@ const isArm64 = process.arch === "arm64";
|
||||
@@ -38,18 +38,6 @@ const isArm64 = process.arch === "arm64";
|
||||
// cf: https://k-hyoda.hatenablog.com/entry/2021/10/23/000349#%E8%BF%BD%E5%8A%A0%E5%B1%95%E9%96%8B%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%85%88%E3%81%AE%E8%A8%AD%E5%AE%9A
|
||||
const extraFilePrefix = isMac ? "MacOS/" : "";
|
||||
|
||||
@@ -25,7 +25,7 @@ index 196a0d7..7e313c2 100644
|
||||
- // Windows: 7za.exe, Linux: 7zzs, macOS: 7zz
|
||||
- (fileName) => ["7za.exe", "7zzs", "7zz"].includes(fileName),
|
||||
- );
|
||||
|
||||
-
|
||||
-if (!sevenZipFile) {
|
||||
- throw new Error(
|
||||
- "7z binary file not found. Run `node ./tools/download7z.js` first.",
|
||||
@@ -34,7 +34,7 @@ index 196a0d7..7e313c2 100644
|
||||
|
||||
/** @type {import("electron-builder").Configuration} */
|
||||
const builderOptions = {
|
||||
@@ -90,14 +79,6 @@ const builderOptions = {
|
||||
@@ -91,14 +79,6 @@ const builderOptions = {
|
||||
from: "build/README.txt",
|
||||
to: extraFilePrefix + "README.txt",
|
||||
},
|
||||
@@ -49,26 +49,15 @@ index 196a0d7..7e313c2 100644
|
||||
],
|
||||
// electron-builder installer
|
||||
productName: "VOICEVOX",
|
||||
diff --git a/src/backend/electron/manager/vvppManager.ts b/src/backend/electron/manager/vvppManager.ts
|
||||
index edd3177..22d0114 100644
|
||||
--- a/src/backend/electron/manager/vvppManager.ts
|
||||
+++ b/src/backend/electron/manager/vvppManager.ts
|
||||
@@ -184,16 +184,8 @@ export class VvppManager {
|
||||
diff --git a/src/backend/electron/vvppFile.ts b/src/backend/electron/vvppFile.ts
|
||||
index 7e152f1..1aaa8c4 100644
|
||||
--- a/src/backend/electron/vvppFile.ts
|
||||
+++ b/src/backend/electron/vvppFile.ts
|
||||
@@ -220,6 +220,7 @@ export class VvppFileExtractor {
|
||||
}
|
||||
|
||||
const args = ["x", "-o" + outputDir, archiveFile, "-t" + format];
|
||||
|
||||
- let sevenZipPath = import.meta.env.VITE_7Z_BIN_NAME;
|
||||
- if (!sevenZipPath) {
|
||||
- throw new Error("7z path is not defined");
|
||||
- }
|
||||
- if (import.meta.env.PROD) {
|
||||
- sevenZipPath = path.join(
|
||||
- path.dirname(app.getPath("exe")),
|
||||
- sevenZipPath,
|
||||
- );
|
||||
- }
|
||||
+ const sevenZipPath = `@sevenzip_path@`;
|
||||
+
|
||||
log.log(
|
||||
"Spawning 7z:",
|
||||
sevenZipPath,
|
||||
private getSevenZipPath(): string {
|
||||
+ return "@sevenzip_path@";
|
||||
let sevenZipPath = import.meta.env.VITE_7Z_BIN_NAME;
|
||||
if (!sevenZipPath) {
|
||||
throw new Error("7z path is not defined");
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
pnpm_9,
|
||||
nodejs,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
makeWrapper,
|
||||
@@ -13,18 +14,19 @@
|
||||
dart-sass,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "voicevox";
|
||||
version = "0.22.4";
|
||||
version = "0.23.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VOICEVOX";
|
||||
repo = "voicevox";
|
||||
tag = version;
|
||||
hash = "sha256-IOs3wBcFYpO4AHiWFOQWd5hp6EmwyA7Rcc8wjHKvYNQ=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-wCC4wl5LPJVJQtV+X795rIXnURseQYiCZ9B6YujTFFw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./unlock-node-and-pnpm-versions.patch
|
||||
(replaceVars ./hardcode-paths.patch {
|
||||
sevenzip_path = lib.getExe _7zz;
|
||||
voicevox_engine_path = lib.getExe voicevox-engine;
|
||||
@@ -33,18 +35,25 @@ buildNpmPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace package.json \
|
||||
--replace-fail "999.999.999" "${version}" \
|
||||
--replace-fail "postinstall" "_postinstall"
|
||||
--replace-fail "999.999.999" "$version" \
|
||||
--replace-fail ' && electron-builder --config electron-builder.config.js --publish never' ""
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-NuKFhDb/J6G3pFYHZedKnY2hDC5GCp70DpqrST4bJMA=";
|
||||
|
||||
# unlock very specific node version bounds specified by upstream
|
||||
npmInstallFlags = [ "--engine-strict=false" ];
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
patches
|
||||
;
|
||||
hash = "sha256-IuyDHAomaGEvGbN4gLpyPfZGm/pF9XK+BkXSipaM7NQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
makeWrapper
|
||||
pnpm_9.configHook
|
||||
nodejs
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
copyDesktopItems
|
||||
@@ -62,17 +71,17 @@ buildNpmPackage rec {
|
||||
substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \
|
||||
--replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["${lib.getExe dart-sass}"];'
|
||||
|
||||
# build command taken from the definition of the `electron:build` npm script
|
||||
VITE_TARGET=electron npm exec vite build
|
||||
|
||||
cp -r ${electron.dist} electron-dist
|
||||
chmod -R u+w electron-dist
|
||||
|
||||
npm exec electron-builder -- \
|
||||
--dir \
|
||||
--config electron-builder.config.js \
|
||||
-c.electronDist=electron-dist \
|
||||
-c.electronVersion=${electron.version}
|
||||
# note: we patched out the call to electron-builder in postPatch
|
||||
pnpm run electron:build
|
||||
|
||||
pnpm exec electron-builder \
|
||||
--dir \
|
||||
--config electron-builder.config.js \
|
||||
-c.electronDist=electron-dist \
|
||||
-c.electronVersion=${electron.version}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
@@ -113,7 +122,7 @@ buildNpmPackage rec {
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/VOICEVOX/voicevox/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/VOICEVOX/voicevox/releases/tag/${finalAttrs.src.tag}";
|
||||
description = "Editor for the VOICEVOX speech synthesis software";
|
||||
homepage = "https://github.com/VOICEVOX/voicevox";
|
||||
license = lib.licenses.lgpl3Only;
|
||||
@@ -124,4 +133,4 @@ buildNpmPackage rec {
|
||||
];
|
||||
platforms = electron.meta.platforms;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
diff --git a/package.json b/package.json
|
||||
index d0a58b4..b57b91c 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -4,13 +4,6 @@
|
||||
"author": "Hiroshiba Kazuyuki",
|
||||
"private": true,
|
||||
"main": "./dist/main.js",
|
||||
- "engines": {
|
||||
- "node": ">=22.14.0 <23"
|
||||
- },
|
||||
- "volta": {
|
||||
- "node": "22.14.0"
|
||||
- },
|
||||
- "packageManager": "pnpm@10.3.0",
|
||||
"scripts": {
|
||||
"// --- lint ---": "",
|
||||
"lint": "eslint .",
|
||||
Reference in New Issue
Block a user