piston/runtimes/swift.nix

27 lines
531 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";
2022-02-07 06:26:23 +01:00
version = (builtins.parseDrvName pkg.name).version;
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
})
];
2022-02-07 06:26:23 +01:00
}