add swift 5.4.2

This commit is contained in:
Dan Vargas 2022-02-03 19:33:40 -07:00
parent 1df354c503
commit e0c41e3dda
3 changed files with 29 additions and 1 deletions

View File

@ -17,4 +17,5 @@ args: {
"ruby" = import ./ruby.nix args;
"zig" = import ./zig.nix args;
"vlang" = import ./vlang.nix args;
"swift" = import ./swift.nix args;
}

View File

@ -1,6 +1,6 @@
{pkgs, piston, ...}:
let
pkg = pkgs.ruby_3_1; # ruby 3.1 stable from unstable channel
pkg = pkgs.ruby_3_1;
in piston.mkRuntime {
language = "ruby";
version = pkg.version;

27
runtimes/swift.nix Normal file
View File

@ -0,0 +1,27 @@
{pkgs, piston, ...}:
let
pkg = pkgs.swift;
in piston.mkRuntime {
language = "swift";
version = "5.4.2";
aliases = [];
run = ''
ls ${pkg}
${pkg}/bin/swift -module-cache-path . "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.swift" = ''
print("OK");
'';
};
args = [];
stdin = "";
packages = [];
main = "test.swift";
})
];
}