- llama-cpp: 9496 -> 9802 - llama-swap: 216 -> 230; UI embed moved upstream to internal/server/, skip forking tests that exec /bin/bash (unavailable in the sandbox) - stable-diffusion-cpp: 462 -> 721; drop lora_enable.patch and server_mask.patch now merged upstream
26 lines
570 B
Nix
26 lines
570 B
Nix
{ llama-swap
|
|
, buildNpmPackage
|
|
,
|
|
}:
|
|
|
|
buildNpmPackage (finalAttrs: {
|
|
pname = "${llama-swap.pname}-ui";
|
|
inherit (llama-swap) version src npmDepsHash;
|
|
|
|
postPatch = ''
|
|
substituteInPlace vite.config.ts \
|
|
--replace-fail "../internal/server/ui_dist" "${placeholder "out"}/ui_dist"
|
|
'';
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/ui-svelte";
|
|
|
|
# bundled "ui_dist" doesn't need node_modules
|
|
postInstall = ''
|
|
rm -rf $out/lib
|
|
'';
|
|
|
|
meta = (removeAttrs llama-swap.meta [ "mainProgram" ]) // {
|
|
description = "${llama-swap.meta.description} - UI";
|
|
};
|
|
})
|