forth nix package

This commit is contained in:
Hydrazer 2022-06-03 08:17:41 -06:00
parent adf4136c10
commit 600d9c4631
3 changed files with 32 additions and 0 deletions

View File

@ -330,6 +330,7 @@ Content-Type: application/json
`erlang`, `erlang`,
`file`, `file`,
`forte`, `forte`,
`forth`,
`fortran`, `fortran`,
`freebasic`, `freebasic`,
`fsharp.net`, `fsharp.net`,

View File

@ -64,4 +64,5 @@ 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; "j" = import ./j.nix args;
"forth" = import ./forth.nix args;
} }

30
runtimes/forth.nix Normal file
View File

@ -0,0 +1,30 @@
{pkgs, piston, ...}:
let
pkg = pkgs.gforth;
in piston.mkRuntime {
language = "forth";
version = pkg.version;
runtime = "forth";
aliases = [
"gforth"
];
run = ''
${pkg}/bin/gforth "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.forth" = ''
.( OK) bye
'';
};
args = [];
stdin = "";
packages = [];
main = "test.forth";
})
];
}