sillytavern: change to global installation (#432510)

This commit is contained in:
Sandro
2025-09-09 17:49:06 +02:00
committed by GitHub
+7 -13
View File
@@ -1,7 +1,5 @@
{
makeBinaryWrapper,
buildNpmPackage,
nodejs,
fetchFromGitHub,
lib,
}:
@@ -17,19 +15,12 @@ buildNpmPackage (finalAttrs: {
};
npmDepsHash = "sha256-hayhsEZN857V6bsWPXupLeqxcOr1sgKs0uWN2pSQD+k=";
nativeBuildInputs = [ makeBinaryWrapper ];
dontNpmBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,opt}
cp -r . $out/opt/sillytavern
makeWrapper ${lib.getExe nodejs} $out/bin/sillytavern \
--add-flags $out/opt/sillytavern/server.js \
--set-default NODE_ENV production
runHook postInstall
# These dirs are not installed automatically.
# And if they were not in place, the app would try to create them at runtime, which is of course impossible to achieve.
postInstall = ''
mkdir $out/lib/node_modules/sillytavern/{backups,public/scripts/extensions/third-party}
'';
meta = {
@@ -37,6 +28,9 @@ buildNpmPackage (finalAttrs: {
longDescription = ''
SillyTavern is a user interface you can install on your computer (and Android phones) that allows you to interact with
text generation AIs and chat/roleplay with characters you or the community create.
This package makes a global installation, instead of a standalone installation according to the official tutorial.
See [the official documentation](https://docs.sillytavern.app/installation/#global--standalone-mode) for the context.
'';
downloadPage = "https://github.com/SillyTavern/SillyTavern/releases";
homepage = "https://docs.sillytavern.app/";