build: 🏗️ Package Worker

This commit is contained in:
Jesse Wierzbinski 2025-04-14 17:13:36 +02:00
parent 5a4ce29206
commit 1beb18e321
No known key found for this signature in database
7 changed files with 66 additions and 9 deletions

21
nix/package-worker.nix Normal file
View file

@ -0,0 +1,21 @@
# Simply edit the server to run "bun run build:worker" instead of "bun run build"
{versia-server}:
versia-server.overrideAttrs (oldAttrs: {
pname = "${oldAttrs.pname}-worker";
buildPhase = ''
runHook preBuild
bun run build:worker
runHook postBuild
'';
entrypointPath = "worker.js";
patches = [./fix-build-spinner-worker.patch];
meta =
oldAttrs.meta
// {
description = "${oldAttrs.meta.description} (worker)";
};
})