j nix package

This commit is contained in:
Hydrazer 2022-06-01 19:38:18 -06:00
parent 36c0c21902
commit dc6d2be0a9
3 changed files with 45 additions and 0 deletions

View File

@ -340,6 +340,7 @@ Content-Type: application/json
`haskell`, `haskell`,
`husk`, `husk`,
`iverilog`, `iverilog`,
`j`,
`japt`, `japt`,
`java`, `java`,
`javascript`, `javascript`,

View File

@ -63,4 +63,5 @@ args: {
"jvm-scala" = import ./jvm-scala.nix args; "jvm-scala" = import ./jvm-scala.nix args;
"llvm_ir" = import ./llvm_ir.nix args; "llvm_ir" = import ./llvm_ir.nix args;
"mono-basic" = import ./mono-basic.nix args; "mono-basic" = import ./mono-basic.nix args;
"j" = import ./j.nix args;
} }

43
runtimes/j.nix Normal file
View File

@ -0,0 +1,43 @@
{pkgs, piston, ...}:
let
pkg = pkgs.j;
in piston.mkRuntime {
language = "j";
version = pkg.version;
aliases = [
"ijs"
];
run = ''
${pkg}/bin/jconsole "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.ijs" = ''
echo'OK'
'';
};
args = [];
stdin = "";
packages = [];
main = "test.ijs";
})
(piston.mkTest {
files = {
"test.ijs" = ''
stdout each |. 2}. ARGV
'';
};
args = ["K" "O"];
stdin = "";
packages = [];
main = "test.ijs";
})
];
}