mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-22 04:56:30 +02:00
Added Pascal
This commit is contained in:
parent
45ee625338
commit
88f2b5bed4
8 changed files with 45 additions and 45 deletions
|
@ -57,4 +57,5 @@ args: {
|
|||
"dotnet-sdk-fsharp" = import ./dotnet-sdk-fsharp.nix args;
|
||||
"dotnet-sdk-fsharp-interactive" = import ./dotnet-sdk-fsharp-interactive.nix args;
|
||||
"dotnet-sdk-visual-basic" = import ./dotnet-sdk-visual-basic.nix args;
|
||||
"fpc-pascal" = import ./fpc-pascal.nix args;
|
||||
}
|
||||
|
|
44
runtimes/fpc-pascal.nix
Normal file
44
runtimes/fpc-pascal.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
binutilsPkg = pkgs.binutils;
|
||||
pkg = pkgs.fpc;
|
||||
in piston.mkRuntime {
|
||||
language = "pascal";
|
||||
version = pkg.version;
|
||||
|
||||
runtime = "fpc";
|
||||
|
||||
aliases = [
|
||||
"freepascal"
|
||||
"pp"
|
||||
"pas"
|
||||
];
|
||||
|
||||
compile = ''
|
||||
export PATH="${binutilsPkg}/bin:$PATH"
|
||||
${pkg}/bin/fpc -oout -v0 "$@"
|
||||
chmod +x out
|
||||
'';
|
||||
|
||||
run = ''
|
||||
shift
|
||||
./out "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.pp" = ''
|
||||
program test;
|
||||
begin
|
||||
writeln(paramStr(1));
|
||||
end.
|
||||
'';
|
||||
};
|
||||
args = ["OK"];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.pp";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue