piston/runtimes/node-javascript.nix

28 lines
462 B
Nix

{pkgs, piston, ...}:
let
pkg = pkgs.nodejs;
in piston.mkRuntime {
language = "javascript";
version = pkg.version;
runtime = "node";
aliases = [
"node-js"
"node-javascript"
"js"
];
run = ''
${pkg}/bin/node "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.js" = ''
console.log("OK");
'';
};
})
];
}