Skip to content

Commit e767a6e

Browse files
authored
Merge pull request #483 from Hydrazer/nix-cool
forth nix package
2 parents adf4136 + 600d9c4 commit e767a6e

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ Content-Type: application/json
330330
`erlang`,
331331
`file`,
332332
`forte`,
333+
`forth`,
333334
`fortran`,
334335
`freebasic`,
335336
`fsharp.net`,

runtimes/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ args: {
6464
"llvm_ir" = import ./llvm_ir.nix args;
6565
"mono-basic" = import ./mono-basic.nix args;
6666
"j" = import ./j.nix args;
67+
"forth" = import ./forth.nix args;
6768
}

runtimes/forth.nix

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{pkgs, piston, ...}:
2+
let
3+
pkg = pkgs.gforth;
4+
in piston.mkRuntime {
5+
language = "forth";
6+
version = pkg.version;
7+
runtime = "forth";
8+
9+
aliases = [
10+
"gforth"
11+
];
12+
13+
run = ''
14+
${pkg}/bin/gforth "$@"
15+
'';
16+
17+
tests = [
18+
(piston.mkTest {
19+
files = {
20+
"test.forth" = ''
21+
.( OK) bye
22+
'';
23+
};
24+
args = [];
25+
stdin = "";
26+
packages = [];
27+
main = "test.forth";
28+
})
29+
];
30+
}

0 commit comments

Comments
 (0)