2022-02-04 03:33:40 +01:00
|
|
|
{pkgs, piston, ...}:
|
|
|
|
let
|
|
|
|
pkg = pkgs.swift;
|
|
|
|
in piston.mkRuntime {
|
|
|
|
language = "swift";
|
2022-02-04 04:00:14 +01:00
|
|
|
version = "5.4.2"; # pkg.version attribute is missing, so pinning it to 5.4.2
|
2022-02-04 03:33:40 +01:00
|
|
|
aliases = [];
|
|
|
|
|
|
|
|
run = ''
|
|
|
|
${pkg}/bin/swift -module-cache-path . "$@"
|
|
|
|
'';
|
|
|
|
|
|
|
|
tests = [
|
|
|
|
(piston.mkTest {
|
|
|
|
files = {
|
2022-02-04 04:00:14 +01:00
|
|
|
"file0.code" = ''
|
2022-02-04 03:33:40 +01:00
|
|
|
print("OK");
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
args = [];
|
|
|
|
stdin = "";
|
|
|
|
packages = [];
|
2022-02-04 04:00:14 +01:00
|
|
|
main = "file0.code";
|
2022-02-04 03:33:40 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|