Added ADA via GNAT 11.2.0
This commit is contained in:
parent
d244f0138c
commit
6161997f49
|
@ -51,4 +51,5 @@ args: {
|
|||
"gcc-fortran" = import ./gcc-fortran.nix args;
|
||||
"yabasic" = import ./yabasic.nix args;
|
||||
"emacs" = import ./emacs.nix args;
|
||||
"gnat-ada" = import ./gnat-ada.nix args;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.gnat;
|
||||
in piston.mkRuntime {
|
||||
language = "ada";
|
||||
version = pkg.version;
|
||||
runtime = "gnat";
|
||||
|
||||
aliases = [
|
||||
"adb"
|
||||
"ads"
|
||||
];
|
||||
|
||||
compile = ''
|
||||
${pkg}/bin/gnatmake "$@" -o a.out
|
||||
'';
|
||||
|
||||
run = ''
|
||||
shift
|
||||
./a.out "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.adb" = ''
|
||||
with Text_IO; use Text_IO;
|
||||
with Ada.Command_line; use Ada.Command_Line;
|
||||
procedure hello is
|
||||
begin
|
||||
Put_Line(Argument(1));
|
||||
end hello;
|
||||
'';
|
||||
};
|
||||
args = ["OK"];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.adb";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue