Build checked portable package artifacts and shared runtime assets

This commit is contained in:
Timothy J. Aveni
2026-09-20 00:25:53 -07:00
parent 0c3c9c6ad8
commit f352ac0c3b
5 changed files with 474 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
# Fresh artifact builder. Candidate plans and runtime dependencies are supplied by the workspace compiler.
{
pkgs,
src,
plan,
protocol,
core,
sharedRuntime,
typescript ? core.dependencies,
packageRevisionId,
portable ? null,
service ? { },
nodeModules ? null,
}:
let
compiler = "${protocol}/libexec/quixos-protocol/execution-world.mjs";
config = pkgs.writeText "camino-artifact-build.json" (
builtins.toJSON {
inherit
plan
compiler
packageRevisionId
core
sharedRuntime
nodeModules
service
;
source = src;
portable =
if portable == null then
null
else
{
inherit (portable) entry;
registryExport = portable.registryExport or "registry";
bindingOutput = portable.bindingOutput or "src/gen/qx.ts";
targets =
portable.targets or [
"browser"
"server"
];
};
node = "${pkgs.nodejs_24}/bin/node";
tsc = "${typescript}/node_modules/typescript/bin/tsc";
esbuild = "${pkgs.esbuild}/bin/esbuild";
shell = "${pkgs.runtimeShell}";
serviceAdapter = ./portable-service.mjs;
}
);
in
pkgs.runCommand "camino-checked-artifacts" { } ''
${pkgs.nodejs_24}/bin/node ${./build-portable-artifacts.mjs} ${config}
''