···1{
2- makeBinaryWrapper,
3 buildNpmPackage,
4- nodejs,
5 fetchFromGitHub,
6 lib,
7}:
···17 };
18 npmDepsHash = "sha256-hayhsEZN857V6bsWPXupLeqxcOr1sgKs0uWN2pSQD+k=";
1920- nativeBuildInputs = [ makeBinaryWrapper ];
21-22 dontNpmBuild = true;
23- installPhase = ''
24- runHook preInstall
2526- 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
33 '';
3435 meta = {
···37 longDescription = ''
38 SillyTavern is a user interface you can install on your computer (and Android phones) that allows you to interact with
39 text generation AIs and chat/roleplay with characters you or the community create.
00040 '';
41 downloadPage = "https://github.com/SillyTavern/SillyTavern/releases";
42 homepage = "https://docs.sillytavern.app/";
···1{
02 buildNpmPackage,
03 fetchFromGitHub,
4 lib,
5}:
···15 };
16 npmDepsHash = "sha256-hayhsEZN857V6bsWPXupLeqxcOr1sgKs0uWN2pSQD+k=";
170018 dontNpmBuild = true;
001920+ # 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}
00024 '';
2526 meta = {
···28 longDescription = ''
29 SillyTavern is a user interface you can install on your computer (and Android phones) that allows you to interact with
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.
34 '';
35 downloadPage = "https://github.com/SillyTavern/SillyTavern/releases";
36 homepage = "https://docs.sillytavern.app/";