| author | |
| committer | |
| log | 736dc126e79c37d8b42429332e01bf6db1a550dc |
| tree | 679e669f884ca4d063a6c54df0460d8bf92f5dc1 |
| parent | 2ee395d03b21646f26eb7e37fd0cb03dadce6f09 |
| signature |
2 files changed, 10 insertions(+), 12 deletions(-)
deps.zig+7-8| ... | @@ -1,9 +1,8 @@ | ... | @@ -1,9 +1,8 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const build = std.build; | ||
| 3 | 2 | ||
| 4 | pub const cache = ".zigmod/deps"; | 3 | pub const cache = ".zigmod/deps"; |
| 5 | 4 | ||
| 6 | pub fn addAllTo(exe: *build.LibExeObjStep) void { | 5 | pub fn addAllTo(exe: *std.build.LibExeObjStep) void { |
| 7 | @setEvalBranchQuota(1_000_000); | 6 | @setEvalBranchQuota(1_000_000); |
| 8 | for (packages) |pkg| { | 7 | for (packages) |pkg| { |
| 9 | exe.addPackage(pkg); | 8 | exe.addPackage(pkg); |
| ... | @@ -47,14 +46,14 @@ pub const _paths = .{ | ... | @@ -47,14 +46,14 @@ pub const _paths = .{ |
| 47 | }; | 46 | }; |
| 48 | 47 | ||
| 49 | pub const package_data = struct { | 48 | pub const package_data = struct { |
| 50 | pub const _s84v9o48ucb0xq0cmzq0cn433hgw0iaqztugja16h8bzxu3h = build.Pkg{ .name = "ansi", .path = cache ++ "/v/git/github.com/nektro/zig-ansi/commit-25039ca/src/lib.zig", .dependencies = &[_]build.Pkg{ } }; | 49 | pub const _s84v9o48ucb0xq0cmzq0cn433hgw0iaqztugja16h8bzxu3h = std.build.Pkg{ .name = "ansi", .path = cache ++ "/v/git/github.com/nektro/zig-ansi/commit-25039ca/src/lib.zig", .dependencies = &[_]std.build.Pkg{ } }; |
| 51 | pub const _2ta738wrqbaqzl3iwzoo8nj35k9ynwz5p5iyz80ryrpp4ttf = build.Pkg{ .name = "known-folders", .path = cache ++ "/v/git/github.com/ziglibs/known-folders/commit-f0f4188/known-folders.zig", .dependencies = &[_]build.Pkg{ } }; | 50 | pub const _2ta738wrqbaqzl3iwzoo8nj35k9ynwz5p5iyz80ryrpp4ttf = std.build.Pkg{ .name = "known-folders", .path = cache ++ "/v/git/github.com/ziglibs/known-folders/commit-f0f4188/known-folders.zig", .dependencies = &[_]std.build.Pkg{ } }; |
| 52 | pub const _2b7mq571jmq31ktmpigopu29480iw245heueajgxzxn7ab8o = build.Pkg{ .name = "zuri", .path = cache ++ "/v/git/github.com/Vexu/zuri/commit-41bcd78/src/zuri.zig", .dependencies = &[_]build.Pkg{ } }; | 51 | pub const _2b7mq571jmq31ktmpigopu29480iw245heueajgxzxn7ab8o = std.build.Pkg{ .name = "zuri", .path = cache ++ "/v/git/github.com/Vexu/zuri/commit-41bcd78/src/zuri.zig", .dependencies = &[_]std.build.Pkg{ } }; |
| 53 | pub const _csbnipaad8n77buaszsnjvlmn6j173fl7pkprsctelswjywe = build.Pkg{ .name = "iguanatls", .path = cache ++ "/v/git/github.com/alexnask/iguanaTLS/commit-1767e48/src/main.zig", .dependencies = &[_]build.Pkg{ } }; | 52 | pub const _csbnipaad8n77buaszsnjvlmn6j173fl7pkprsctelswjywe = std.build.Pkg{ .name = "iguanatls", .path = cache ++ "/v/git/github.com/alexnask/iguanaTLS/commit-1767e48/src/main.zig", .dependencies = &[_]std.build.Pkg{ } }; |
| 54 | pub const _0npcrzfdlrvkf44mzjo8bduj9gmqyefo0j3rstt6b0pm2r6r = build.Pkg{ .name = "licenses", .path = cache ++ "/v/git/github.com/nektro/zig-licenses/commit-1a19e4b/src/lib.zig", .dependencies = &[_]build.Pkg{ } }; | 53 | pub const _0npcrzfdlrvkf44mzjo8bduj9gmqyefo0j3rstt6b0pm2r6r = std.build.Pkg{ .name = "licenses", .path = cache ++ "/v/git/github.com/nektro/zig-licenses/commit-1a19e4b/src/lib.zig", .dependencies = &[_]std.build.Pkg{ } }; |
| 55 | }; | 54 | }; |
| 56 | 55 | ||
| 57 | pub const packages = &[_]build.Pkg{ | 56 | pub const packages = &[_]std.build.Pkg{ |
| 58 | package_data._s84v9o48ucb0xq0cmzq0cn433hgw0iaqztugja16h8bzxu3h, | 57 | package_data._s84v9o48ucb0xq0cmzq0cn433hgw0iaqztugja16h8bzxu3h, |
| 59 | package_data._2ta738wrqbaqzl3iwzoo8nj35k9ynwz5p5iyz80ryrpp4ttf, | 58 | package_data._2ta738wrqbaqzl3iwzoo8nj35k9ynwz5p5iyz80ryrpp4ttf, |
| 60 | package_data._2b7mq571jmq31ktmpigopu29480iw245heueajgxzxn7ab8o, | 59 | package_data._2b7mq571jmq31ktmpigopu29480iw245heueajgxzxn7ab8o, |
src/cmd/fetch.zig+3-4| ... | @@ -24,12 +24,11 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -24,12 +24,11 @@ pub fn execute(args: [][]u8) !void { |
| 24 | 24 | ||
| 25 | const w = f.writer(); | 25 | const w = f.writer(); |
| 26 | try w.writeAll("const std = @import(\"std\");\n"); | 26 | try w.writeAll("const std = @import(\"std\");\n"); |
| 27 | try w.writeAll("const build = std.build;\n"); | ||
| 28 | try w.writeAll("\n"); | 27 | try w.writeAll("\n"); |
| 29 | try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(dir)}); | 28 | try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(dir)}); |
| 30 | try w.writeAll("\n"); | 29 | try w.writeAll("\n"); |
| 31 | try w.print("{s}\n", .{ | 30 | try w.print("{s}\n", .{ |
| 32 | \\pub fn addAllTo(exe: *build.LibExeObjStep) void { | 31 | \\pub fn addAllTo(exe: *std.build.LibExeObjStep) void { |
| 33 | \\ @setEvalBranchQuota(1_000_000); | 32 | \\ @setEvalBranchQuota(1_000_000); |
| 34 | \\ for (packages) |pkg| { | 33 | \\ for (packages) |pkg| { |
| 35 | \\ exe.addPackage(pkg); | 34 | \\ exe.addPackage(pkg); |
| ... | @@ -129,7 +128,7 @@ fn print_deps(w: fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32, array: | ... | @@ -129,7 +128,7 @@ fn print_deps(w: fs.File.Writer, dir: []const u8, m: u.Module, tabs: i32, array: |
| 129 | return; | 128 | return; |
| 130 | } | 129 | } |
| 131 | if (array) { | 130 | if (array) { |
| 132 | try u.print_all(w, .{"&[_]build.Pkg{"}, true); | 131 | try u.print_all(w, .{"&[_]std.build.Pkg{"}, true); |
| 133 | } else { | 132 | } else { |
| 134 | try u.print_all(w, .{"struct {"}, true); | 133 | try u.print_all(w, .{"struct {"}, true); |
| 135 | } | 134 | } |
| ... | @@ -210,7 +209,7 @@ fn print_pkg_data_to(w: fs.File.Writer, list: *std.ArrayList(u.Module), list2: * | ... | @@ -210,7 +209,7 @@ fn print_pkg_data_to(w: fs.File.Writer, list: *std.ArrayList(u.Module), list2: * |
| 210 | while (i < list.items.len) : (i += 1) { | 209 | while (i < list.items.len) : (i += 1) { |
| 211 | const mod = list.items[i]; | 210 | const mod = list.items[i]; |
| 212 | if (contains_all(mod.deps, list2)) { | 211 | if (contains_all(mod.deps, list2)) { |
| 213 | try w.print(" pub const _{s} = build.Pkg{{ .name = \"{s}\", .path = cache ++ \"/{}/{s}\", .dependencies = &[_]build.Pkg{{", .{mod.id, mod.name, std.zig.fmtEscapes(mod.clean_path), mod.main}); | 212 | try w.print(" pub const _{s} = std.build.Pkg{{ .name = \"{s}\", .path = cache ++ \"/{}/{s}\", .dependencies = &[_]std.build.Pkg{{", .{mod.id, mod.name, std.zig.fmtEscapes(mod.clean_path), mod.main}); |
| 214 | for (mod.deps) |d| { | 213 | for (mod.deps) |d| { |
| 215 | if (d.main.len > 0) { | 214 | if (d.main.len > 0) { |
| 216 | try w.print(" _{s},", .{d.id}); | 215 | try w.print(" _{s},", .{d.id}); |