From 41613e73b3c3e5dd13118146a847b2fbf98eff91 Mon Sep 17 00:00:00 2001 From: rczb Date: Fri, 15 Aug 2025 11:50:42 +0800 Subject: [PATCH] sillytavern: change to global installation --- pkgs/by-name/si/sillytavern/package.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/si/sillytavern/package.nix b/pkgs/by-name/si/sillytavern/package.nix index 0f75fefdbf89..71eebe842230 100644 --- a/pkgs/by-name/si/sillytavern/package.nix +++ b/pkgs/by-name/si/sillytavern/package.nix @@ -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/";