Merge pull request #173 from dvargas46/v3-add-zig

pkg(zig-0.7.1): Add zig 0.7.1
This commit is contained in:
Thomas 2021-03-19 13:38:20 +13:00 committed by GitHub
commit 70c315e29a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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", .{});
}