Merge pull request #483 from Hydrazer/nix-cool

forth nix package
This commit is contained in:
Thomas Hobson 2022-06-05 00:21:58 +12:00 committed by GitHub
commit e767a6eafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 0 deletions

View File

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

View File

@ -64,4 +64,5 @@ args: {
"llvm_ir" = import ./llvm_ir.nix args;
"mono-basic" = import ./mono-basic.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";
})
];
}