mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
migrate ponylang to nix
This commit is contained in:
parent
a8adca3e18
commit
dc2c5f3380
8 changed files with 38 additions and 50 deletions
|
@ -25,4 +25,5 @@ args: {
|
|||
"racket" = import ./racket.nix args;
|
||||
"powershell" = import ./powershell.nix args;
|
||||
"prolog" = import ./prolog.nix args;
|
||||
"ponylang" = import ./ponylang.nix args;
|
||||
}
|
||||
|
|
37
runtimes/ponylang.nix
Normal file
37
runtimes/ponylang.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.ponyc;
|
||||
in piston.mkRuntime {
|
||||
language = "ponylang";
|
||||
version = pkg.version;
|
||||
aliases = [
|
||||
"pony"
|
||||
"ponyc"
|
||||
];
|
||||
|
||||
compile = ''
|
||||
rename 's/$/.pony/' "$@" # Add .pony extension
|
||||
${pkg}/bin/ponyc -b out
|
||||
'';
|
||||
|
||||
run = ''
|
||||
shift
|
||||
./out "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.pony" = ''
|
||||
actor Main
|
||||
new create(env: Env) =>
|
||||
env.out.print("OK")
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.pony";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue