pkg(zig-0.7.1): Add zig 0.7.1

This commit is contained in:
Vargas, Dan 2021-03-18 16:45:14 -05:00
parent 7c67be39b0
commit fb95a4dbc0
6 changed files with 34 additions and 0 deletions

10
packages/zig/0.7.1/build.sh vendored Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
mkdir -p bin
cd bin/
curl -L "https://ziglang.org/download/0.7.1/zig-linux-x86_64-0.7.1.tar.xz" -o zig.tar.xz
tar xf zig.tar.xz --strip-components=1
rm zig.tar.xz
cd ../

4
packages/zig/0.7.1/compile vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# optimizing for small programs
zig build-exe -O ReleaseSmall --color off --cache-dir . --global-cache-dir . --name out "$@"

4
packages/zig/0.7.1/environment vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# compiler path
export PATH=$PWD/bin:$PATH

6
packages/zig/0.7.1/metadata.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"language": "zig",
"version": "0.7.1",
"aliases": ["zig"],
"author": "Dan Vargas <danvargas46@gmail.com>"
}

4
packages/zig/0.7.1/run vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
shift # Filename is only used in compile step, so we can take it out here
./out "$@"

6
packages/zig/0.7.1/test.zig vendored Normal file
View File

@ -0,0 +1,6 @@
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("OK\n", .{});
}