| author | |
| committer | |
| log | 82f021f019d8dcd7520521bb80e10d7988da27da |
| tree | 8d86bfec8eedce5fd003d2538d1d50d398708b2b |
| parent | f242d848aef5798dc8349d22d2bae84aa6a8276d |
| signature |
8 files changed, 16 insertions(+), 7 deletions(-)
deps.zig+2| ... | ... | @@ -338,6 +338,7 @@ pub const packages = [_]*Package{ |
| 338 | 338 | &package_data._o6ogpor87xc2, |
| 339 | 339 | &package_data._f7dubzb7cyqe, |
| 340 | 340 | &package_data._s84v9o48ucb0, |
| 341 | &package_data._kscsl0145t7x, | |
| 341 | 342 | }; |
| 342 | 343 | |
| 343 | 344 | pub const pkgs = struct { |
| ... | ... | @@ -345,6 +346,7 @@ pub const pkgs = struct { |
| 345 | 346 | pub const win32 = &package_data._o6ogpor87xc2; |
| 346 | 347 | pub const extras = &package_data._f7dubzb7cyqe; |
| 347 | 348 | pub const ansi = &package_data._s84v9o48ucb0; |
| 349 | pub const nio = &package_data._kscsl0145t7x; | |
| 348 | 350 | }; |
| 349 | 351 | |
| 350 | 352 | pub const imports = struct { |
src/cmd/init.zig+2-1| ... | ... | @@ -8,6 +8,7 @@ const knownfolders = @import("known-folders"); |
| 8 | 8 | const ini = @import("ini"); |
| 9 | 9 | const time = @import("time"); |
| 10 | 10 | const extras = @import("extras"); |
| 11 | const nio = @import("nio"); | |
| 11 | 12 | |
| 12 | 13 | const u = @import("./../util/funcs.zig"); |
| 13 | 14 | const common = @import("./../common.zig"); |
| ... | ... | @@ -85,7 +86,7 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 85 | 86 | "year:", |
| 86 | 87 | string, |
| 87 | 88 | "{s}", |
| 88 | try std.fmt.allocPrint(gpa, "{d}", .{time.DateTime.now().years}), | |
| 89 | try nio.fmt.allocPrint(gpa, "{d}", .{time.DateTime.now().years}), | |
| 89 | 90 | )); |
| 90 | 91 | realtext = try std.mem.replaceOwned(u8, gpa, realtext, "<copyright holders>", try inquirer.forString( |
| 91 | 92 | stdout, |
src/cmd/install.zig+3-2| ... | ... | @@ -3,6 +3,7 @@ const string = []const u8; |
| 3 | 3 | const gpa = std.heap.c_allocator; |
| 4 | 4 | const knownfolders = @import("known-folders"); |
| 5 | 5 | const extras = @import("extras"); |
| 6 | const nio = @import("nio"); | |
| 6 | 7 | |
| 7 | 8 | const zigmod = @import("./../lib.zig"); |
| 8 | 9 | const u = @import("./../util/funcs.zig"); |
| ... | ... | @@ -62,8 +63,8 @@ pub fn execute(self_name: []const u8, args: [][:0]u8) !void { |
| 62 | 63 | try ci.do(gpa, cachepath, moddir); |
| 63 | 64 | |
| 64 | 65 | const modfile = try zigmod.ModFile.from_dir(gpa, moddir, modpath); |
| 65 | const zigversion_sv = modfile.min_zig_version orelse u.fail("zigmod manifest requires min_zig_version field", .{}); | |
| 66 | const zigversion = try std.fmt.allocPrint(gpa, "{}", .{zigversion_sv}); | |
| 66 | _ = modfile.min_zig_version orelse u.fail("zigmod manifest requires min_zig_version field", .{}); | |
| 67 | const zigversion = try nio.fmt.allocPrint(gpa, "{s}", .{modfile.yaml.get_string("min_zig_version").?}); | |
| 67 | 68 | const zigpath = try std.fs.path.join(gpa, &.{ datapath, "zig", zigversion, "zig" }); |
| 68 | 69 | |
| 69 | 70 | // zig build |
src/common.zig+2-1| ... | ... | @@ -3,6 +3,7 @@ const string = []const u8; |
| 3 | 3 | const builtin = @import("builtin"); |
| 4 | 4 | const ansi = @import("ansi"); |
| 5 | 5 | const extras = @import("extras"); |
| 6 | const nio = @import("nio"); | |
| 6 | 7 | |
| 7 | 8 | const zigmod = @import("./lib.zig"); |
| 8 | 9 | const u = @import("./util/funcs.zig"); |
| ... | ... | @@ -302,7 +303,7 @@ pub fn gen_files_package(alloc: std.mem.Allocator, cachepath: string, mdir: std. |
| 302 | 303 | continue; |
| 303 | 304 | } |
| 304 | 305 | const path = try alloc.dupe(u8, p.path); |
| 305 | try map.put(path, try std.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path })); | |
| 306 | try map.put(path, try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path })); | |
| 306 | 307 | } |
| 307 | 308 | } |
| 308 | 309 |
src/main.zig+2-1| ... | ... | @@ -4,6 +4,7 @@ const builtin = @import("builtin"); |
| 4 | 4 | pub const build_options = @import("build_options"); |
| 5 | 5 | const zigmod = @import("zigmod"); |
| 6 | 6 | const win32 = @import("win32"); |
| 7 | const nio = @import("nio"); | |
| 7 | 8 | |
| 8 | 9 | // |
| 9 | 10 | // |
| ... | ... | @@ -56,7 +57,7 @@ pub fn main() !void { |
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | var sub_cmd_args = std.ArrayList(string).init(gpa); |
| 59 | try sub_cmd_args.append(try std.fmt.allocPrint(gpa, "zigmod-{s}", .{args[0]})); | |
| 60 | try sub_cmd_args.append(try nio.fmt.allocPrint(gpa, "zigmod-{s}", .{args[0]})); | |
| 60 | 61 | for (args[1..]) |item| { |
| 61 | 62 | try sub_cmd_args.append(item); |
| 62 | 63 | } |
src/util/dep_type.zig+2-1| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const string = []const u8; |
| 3 | const nio = @import("nio"); | |
| 3 | 4 | |
| 4 | 5 | const u = @import("./funcs.zig"); |
| 5 | 6 | |
| ... | ... | @@ -68,7 +69,7 @@ pub const DepType = enum { |
| 68 | 69 | .local => "", |
| 69 | 70 | .system_lib => "", |
| 70 | 71 | .framework => "", |
| 71 | .git => try std.fmt.allocPrint(alloc, "commit-{s}", .{(try u.git_rev_HEAD(alloc, mdir))}), | |
| 72 | .git => try nio.fmt.allocPrint(alloc, "commit-{s}", .{(try u.git_rev_HEAD(alloc, mdir))}), | |
| 72 | 73 | .hg => "", |
| 73 | 74 | .http => "", |
| 74 | 75 | }; |
src/util/module.zig+2-1| ... | ... | @@ -3,6 +3,7 @@ const string = []const u8; |
| 3 | 3 | const builtin = @import("builtin"); |
| 4 | 4 | const yaml = @import("yaml"); |
| 5 | 5 | const extras = @import("extras"); |
| 6 | const nio = @import("nio"); | |
| 6 | 7 | |
| 7 | 8 | const zigmod = @import("../lib.zig"); |
| 8 | 9 | const u = @import("funcs.zig"); |
| ... | ... | @@ -95,7 +96,7 @@ pub const Module = struct { |
| 95 | 96 | } |
| 96 | 97 | var out: [32]u8 = undefined; |
| 97 | 98 | h.final(&out); |
| 98 | const hex = try std.fmt.allocPrint(alloc, "blake3-{x}", .{std.fmt.fmtSliceHexLower(out[0..])}); | |
| 99 | const hex = try nio.fmt.allocPrint(alloc, "blake3-{s}", .{&extras.to_hex(out)}); | |
| 99 | 100 | return hex; |
| 100 | 101 | } |
| 101 | 102 |
zig.mod+1| ... | ... | @@ -35,3 +35,4 @@ root_dependencies: |
| 35 | 35 | license: MIT |
| 36 | 36 | - src: git https://github.com/nektro/zig-extras |
| 37 | 37 | - src: git https://github.com/nektro/zig-ansi |
| 38 | - src: git https://github.com/nektro/zig-nio |