piston/runtimes/swift.nix

27 lines
515 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";
aliases = [];
run = ''
ls ${pkg}
${pkg}/bin/swift -module-cache-path . "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.swift" = ''
print("OK");
'';
};
args = [];
stdin = "";
packages = [];
main = "test.swift";
})
];
}