30 lines
755 B
Nix
30 lines
755 B
Nix
{
|
|
pkgs,
|
|
context,
|
|
artifacts,
|
|
}:
|
|
let
|
|
groups = map (artifact: artifact.caminoGroup or artifact) artifacts;
|
|
config = pkgs.writeText "camino-package-assembly.json" (
|
|
builtins.toJSON {
|
|
inherit groups;
|
|
inherit (context) plan packageRevisionId sharedRuntime;
|
|
compiler = "${context.generator}/libexec/quixos-protocol/execution-world.mjs";
|
|
node = "${pkgs.nodejs_24}/bin/node";
|
|
esbuild = "${pkgs.esbuild}/bin/esbuild";
|
|
shell = "${pkgs.runtimeShell}";
|
|
serviceAdapter = ./portable-service.mjs;
|
|
}
|
|
);
|
|
in
|
|
pkgs.runCommand "camino-package"
|
|
{
|
|
passthru = {
|
|
caminoGroups = groups;
|
|
assemblyConfig = config;
|
|
};
|
|
}
|
|
''
|
|
${pkgs.nodejs_24}/bin/node ${./.}/assemble-package.mjs ${config}
|
|
''
|