22 lines
491 B
Nix
22 lines
491 B
Nix
{
|
|
pkgs,
|
|
context,
|
|
src,
|
|
members,
|
|
dependencies ? null,
|
|
}:
|
|
let
|
|
config = pkgs.writeText "camino-react-contracts.json" (
|
|
builtins.toJSON {
|
|
source = src;
|
|
interface = context.interface;
|
|
inherit members dependencies;
|
|
node = "${pkgs.nodejs_24}/bin/node";
|
|
tsc = "${context.typescript}/node_modules/typescript/bin/tsc";
|
|
}
|
|
);
|
|
in
|
|
pkgs.runCommand "camino-react-contracts" { } ''
|
|
${pkgs.nodejs_24}/bin/node ${./.}/build-react-contracts.mjs ${config}
|
|
''
|