piston/runtimes/swift.nix

26 lines
556 B
Nix
Raw Normal View History

2022-02-04 03:33:40 +01:00
{pkgs, piston, ...}:
let
pkg = pkgs.swift;
in piston.mkRuntime {
language = "swift";
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 = {
"file0.code" = ''
2022-02-04 03:33:40 +01:00
print("OK");
'';
};
args = [];
stdin = "";
packages = [];
main = "file0.code";
2022-02-04 03:33:40 +01:00
})
];
}