Compare commits

...

2 Commits

Author SHA1 Message Date
Thomas Hobson e767a6eafc
Merge pull request #483 from Hydrazer/nix-cool
forth nix package
2022-06-05 00:21:58 +12:00
Hydrazer 600d9c4631 forth nix package 2022-06-03 15:20:18 -06:00
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";
})
];
}