sillytavern: change to global installation (#432510)

authored by Sandro and committed by GitHub fee695a9 42efe1cc

+7 -13
+7 -13
pkgs/by-name/si/sillytavern/package.nix
··· 1 1 { 2 - makeBinaryWrapper, 3 2 buildNpmPackage, 4 - nodejs, 5 3 fetchFromGitHub, 6 4 lib, 7 5 }: ··· 17 15 }; 18 16 npmDepsHash = "sha256-hayhsEZN857V6bsWPXupLeqxcOr1sgKs0uWN2pSQD+k="; 19 17 20 - nativeBuildInputs = [ makeBinaryWrapper ]; 21 - 22 18 dontNpmBuild = true; 23 - installPhase = '' 24 - runHook preInstall 25 19 26 - mkdir -p $out/{bin,opt} 27 - cp -r . $out/opt/sillytavern 28 - makeWrapper ${lib.getExe nodejs} $out/bin/sillytavern \ 29 - --add-flags $out/opt/sillytavern/server.js \ 30 - --set-default NODE_ENV production 31 - 32 - runHook postInstall 20 + # These dirs are not installed automatically. 21 + # And if they were not in place, the app would try to create them at runtime, which is of course impossible to achieve. 22 + postInstall = '' 23 + mkdir $out/lib/node_modules/sillytavern/{backups,public/scripts/extensions/third-party} 33 24 ''; 34 25 35 26 meta = { ··· 37 28 longDescription = '' 38 29 SillyTavern is a user interface you can install on your computer (and Android phones) that allows you to interact with 39 30 text generation AIs and chat/roleplay with characters you or the community create. 31 + 32 + This package makes a global installation, instead of a standalone installation according to the official tutorial. 33 + See [the official documentation](https://docs.sillytavern.app/installation/#global--standalone-mode) for the context. 40 34 ''; 41 35 downloadPage = "https://github.com/SillyTavern/SillyTavern/releases"; 42 36 homepage = "https://docs.sillytavern.app/";