From dc6d2be0a9bee2b25e124d2514b16bd1181e9f2d Mon Sep 17 00:00:00 2001 From: Hydrazer Date: Wed, 1 Jun 2022 19:38:18 -0600 Subject: [PATCH] j nix package --- readme.md | 1 + runtimes/default.nix | 1 + runtimes/j.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 runtimes/j.nix diff --git a/readme.md b/readme.md index c51ce97..9eafa28 100644 --- a/readme.md +++ b/readme.md @@ -340,6 +340,7 @@ Content-Type: application/json `haskell`, `husk`, `iverilog`, +`j`, `japt`, `java`, `javascript`, diff --git a/runtimes/default.nix b/runtimes/default.nix index 4624670..e8eb533 100644 --- a/runtimes/default.nix +++ b/runtimes/default.nix @@ -63,4 +63,5 @@ args: { "jvm-scala" = import ./jvm-scala.nix args; "llvm_ir" = import ./llvm_ir.nix args; "mono-basic" = import ./mono-basic.nix args; + "j" = import ./j.nix args; } diff --git a/runtimes/j.nix b/runtimes/j.nix new file mode 100644 index 0000000..730960b --- /dev/null +++ b/runtimes/j.nix @@ -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"; + }) + ]; +} + +