fix zig extension rename
This commit is contained in:
parent
e0c41e3dda
commit
a857780f34
|
@ -8,7 +8,7 @@ in piston.mkRuntime {
|
||||||
|
|
||||||
# Add .zig extension for compile script and optimize compiler for small programs
|
# Add .zig extension for compile script and optimize compiler for small programs
|
||||||
compile = ''
|
compile = ''
|
||||||
rename 's/$/\.zig/' "$@"
|
for f; do mv "$f" "$f.zig"; done
|
||||||
${pkg}/bin/zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig
|
${pkg}/bin/zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ in piston.mkRuntime {
|
||||||
# Run the following command to test the package:
|
# Run the following command to test the package:
|
||||||
# $ ./piston test zig
|
# $ ./piston test zig
|
||||||
tests = [
|
tests = [
|
||||||
# Standard output test
|
# Standard output test with generic file extension
|
||||||
(piston.mkTest {
|
(piston.mkTest {
|
||||||
files = {
|
files = {
|
||||||
"test.zig" = ''
|
"file0.code" = ''
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
@ -37,7 +37,7 @@ in piston.mkRuntime {
|
||||||
args = [];
|
args = [];
|
||||||
stdin = "";
|
stdin = "";
|
||||||
packages = [];
|
packages = [];
|
||||||
main = "test.zig";
|
main = "file0.code";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue