authoravatarMeghan Denny<hello@nektro.net>2026-10-15 22:52:09-07:00
committeravatarMeghan Denny<hello@nektro.net>2026-10-15 22:53:56-07:00
log0319d62e9b650aaeae25d7e9d317a0b4fe83a9d7
tree70133d6c868d6bf08a63fc3ed78ae6bbd85e04ec
parentd7799c31219ca278d116e33552865a64416062d3
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

cmd/generate: remove Package entry


2 files changed, 12 insertions(+), 41 deletions(-)

deps.zig+6-32
...@@ -51,11 +51,6 @@ pub const GitExactStep = struct {...@@ -51,11 +51,6 @@ pub const GitExactStep = struct {
51pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {51pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {
52 const b = exe.step.owner;52 const b = exe.step.owner;
53 const step = b.step("fetch", "");53 const step = b.step("fetch", "");
54 inline for (comptime std.meta.declarations(package_data)) |decl| {
55 const path = &@field(package_data, decl.name).entry;
56 const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else ".";
57 if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? });
58 }
59 step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "9f15c276b4e9d05afd34a10d8662a7dfc34647ea").step);54 step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "9f15c276b4e9d05afd34a10d8662a7dfc34647ea").step);
60 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "d2465c64833590a04bd9b7f50c87363fd03e65bf").step);55 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "d2465c64833590a04bd9b7f50c87363fd03e65bf").step);
61 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "bebb39ae30d9848a1c212cee582d0b1c102d8b87").step);56 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "bebb39ae30d9848a1c212cee582d0b1c102d8b87").step);
...@@ -111,7 +106,6 @@ pub fn addAllTo(exe: *std.Build.Step.Compile) void {...@@ -111,7 +106,6 @@ pub fn addAllTo(exe: *std.Build.Step.Compile) void {
111var link_lib_c = false;106var link_lib_c = false;
112pub const Package = struct {107pub const Package = struct {
113 name: string = "",108 name: string = "",
114 entry: ?string = null,
115 store: ?string = null,109 store: ?string = null,
116 main: ?string = null,110 main: ?string = null,
117 deps: []const *Package = &.{},111 deps: []const *Package = &.{},
...@@ -142,8 +136,12 @@ pub const Package = struct {...@@ -142,8 +136,12 @@ pub const Package = struct {
142 });136 });
143 dummy_library.step.dependOn(fetch_step);137 dummy_library.step.dependOn(fetch_step);
144 var links: u32 = 0;138 var links: u32 = 0;
145 if (self.entry) |capture| {139 if (self.main) |m| {
146 result.root_source_file = .{ .cwd_relative = capture };140 if (self.store) |s| {
141 result.root_source_file = (std.Build.LazyPath{ .cwd_relative = b.cache_root.path.? }).path(b, "zigmod/deps").path(b, s[1..]).path(b, m);
142 } else {
143 result.root_source_file = b.path(m);
144 }
147 }145 }
148 for (self.deps) |item| {146 for (self.deps) |item| {
149 const module_dep = item.module(exe, fetch_step);147 const module_dep = item.module(exe, fetch_step);
...@@ -199,142 +197,120 @@ pub const package_data = struct {...@@ -199,142 +197,120 @@ pub const package_data = struct {
199 pub var _o6ogpor87xc2 = Package{197 pub var _o6ogpor87xc2 = Package{
200 .store = "/git/github.com/marlersoft/zigwin32/9f15c276b4e9d05afd34a10d8662a7dfc34647ea",198 .store = "/git/github.com/marlersoft/zigwin32/9f15c276b4e9d05afd34a10d8662a7dfc34647ea",
201 .name = "win32",199 .name = "win32",
202 .entry = "/git/github.com/marlersoft/zigwin32/9f15c276b4e9d05afd34a10d8662a7dfc34647ea/win32.zig",
203 .main = "win32.zig",200 .main = "win32.zig",
204 };201 };
205 pub var _u7sysdckdymi = Package{202 pub var _u7sysdckdymi = Package{
206 .store = "/git/github.com/nektro/arqv-ini/d2465c64833590a04bd9b7f50c87363fd03e65bf",203 .store = "/git/github.com/nektro/arqv-ini/d2465c64833590a04bd9b7f50c87363fd03e65bf",
207 .name = "ini",204 .name = "ini",
208 .entry = "/git/github.com/nektro/arqv-ini/d2465c64833590a04bd9b7f50c87363fd03e65bf/src/ini.zig",
209 .main = "src/ini.zig",205 .main = "src/ini.zig",
210 };206 };
211 pub var _s84v9o48ucb0 = Package{207 pub var _s84v9o48ucb0 = Package{
212 .store = "/git/github.com/nektro/zig-ansi/bebb39ae30d9848a1c212cee582d0b1c102d8b87",208 .store = "/git/github.com/nektro/zig-ansi/bebb39ae30d9848a1c212cee582d0b1c102d8b87",
213 .name = "ansi",209 .name = "ansi",
214 .entry = "/git/github.com/nektro/zig-ansi/bebb39ae30d9848a1c212cee582d0b1c102d8b87/src/lib.zig",
215 .main = "src/lib.zig",210 .main = "src/lib.zig",
216 };211 };
217 pub var _f7dubzb7cyqe = Package{212 pub var _f7dubzb7cyqe = Package{
218 .store = "/git/github.com/nektro/zig-extras/8f6c4761e5c22c6a5c83a032e764154b840275bc",213 .store = "/git/github.com/nektro/zig-extras/8f6c4761e5c22c6a5c83a032e764154b840275bc",
219 .name = "extras",214 .name = "extras",
220 .entry = "/git/github.com/nektro/zig-extras/8f6c4761e5c22c6a5c83a032e764154b840275bc/src/lib.zig",
221 .main = "src/lib.zig",215 .main = "src/lib.zig",
222 };216 };
223 pub var _c1xirp1ota5p = Package{217 pub var _c1xirp1ota5p = Package{
224 .store = "/git/github.com/nektro/zig-inquirer/e745b018f87ddc4c8958370332e6cf61625403cc",218 .store = "/git/github.com/nektro/zig-inquirer/e745b018f87ddc4c8958370332e6cf61625403cc",
225 .name = "inquirer",219 .name = "inquirer",
226 .entry = "/git/github.com/nektro/zig-inquirer/e745b018f87ddc4c8958370332e6cf61625403cc/src/lib.zig",
227 .main = "src/lib.zig",220 .main = "src/lib.zig",
228 .deps = &[_]*Package{ &_s84v9o48ucb0 },221 .deps = &[_]*Package{ &_s84v9o48ucb0 },
229 };222 };
230 pub var _96h80ezrvj7i = Package{223 pub var _96h80ezrvj7i = Package{
231 .store = "/git/github.com/nektro/zig-leven/014971d4b1e327a5c61322c3a6b9369fd1863864",224 .store = "/git/github.com/nektro/zig-leven/014971d4b1e327a5c61322c3a6b9369fd1863864",
232 .name = "leven",225 .name = "leven",
233 .entry = "/git/github.com/nektro/zig-leven/014971d4b1e327a5c61322c3a6b9369fd1863864/src/lib.zig",
234 .main = "src/lib.zig",226 .main = "src/lib.zig",
235 };227 };
236 pub var _0npcrzfdlrvk = Package{228 pub var _0npcrzfdlrvk = Package{
237 .store = "/git/github.com/nektro/zig-licenses/bc1cd51625c13d6c7df819fd0d85968e617f5c57",229 .store = "/git/github.com/nektro/zig-licenses/bc1cd51625c13d6c7df819fd0d85968e617f5c57",
238 .name = "licenses",230 .name = "licenses",
239 .entry = "/git/github.com/nektro/zig-licenses/bc1cd51625c13d6c7df819fd0d85968e617f5c57/src/lib.zig",
240 .main = "src/lib.zig",231 .main = "src/lib.zig",
241 };232 };
242 pub var _pt88y5d80m25 = Package{233 pub var _pt88y5d80m25 = Package{
243 .store = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee",234 .store = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee",
244 .name = "licenses-text",235 .name = "licenses-text",
245 .entry = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee/src/lib.zig",
246 .main = "src/lib.zig",236 .main = "src/lib.zig",
247 };237 };
248 pub var _73bukkeci2u6 = Package{238 pub var _73bukkeci2u6 = Package{
249 .store = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920",239 .store = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920",
250 .name = "sys-darwin",240 .name = "sys-darwin",
251 .entry = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920/sys_darwin.zig",
252 .main = "sys_darwin.zig",241 .main = "sys_darwin.zig",
253 };242 };
254 pub var _qfev2g50alvp = Package{243 pub var _qfev2g50alvp = Package{
255 .store = "/git/github.com/nektro/zig-sys-freebsd/f97e6c2de30af76818572490735c84ce1015958b",244 .store = "/git/github.com/nektro/zig-sys-freebsd/f97e6c2de30af76818572490735c84ce1015958b",
256 .name = "sys-freebsd",245 .name = "sys-freebsd",
257 .entry = "/git/github.com/nektro/zig-sys-freebsd/f97e6c2de30af76818572490735c84ce1015958b/freebsd.zig",
258 .main = "freebsd.zig",246 .main = "freebsd.zig",
259 };247 };
260 pub var _h7tv7ayhffak = Package{248 pub var _h7tv7ayhffak = Package{
261 .store = "/git/github.com/nektro/zig-sys-linux/6dabe7cce239d882c8fd132ab5cda1d1f9ff3634",249 .store = "/git/github.com/nektro/zig-sys-linux/6dabe7cce239d882c8fd132ab5cda1d1f9ff3634",
262 .name = "sys-linux",250 .name = "sys-linux",
263 .entry = "/git/github.com/nektro/zig-sys-linux/6dabe7cce239d882c8fd132ab5cda1d1f9ff3634/mod.zig",
264 .main = "mod.zig",251 .main = "mod.zig",
265 };252 };
266 pub var _uvkgl6xf1azv = Package{253 pub var _uvkgl6xf1azv = Package{
267 .store = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7",254 .store = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7",
268 .name = "sys-netbsd",255 .name = "sys-netbsd",
269 .entry = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7/netbsd.zig",
270 .main = "netbsd.zig",256 .main = "netbsd.zig",
271 };257 };
272 pub var _4rmxgmcykiba = Package{258 pub var _4rmxgmcykiba = Package{
273 .store = "/git/github.com/nektro/zig-sys-openbsd/164646a5e7c4129eb92ac524a60f1759605c99df",259 .store = "/git/github.com/nektro/zig-sys-openbsd/164646a5e7c4129eb92ac524a60f1759605c99df",
274 .name = "sys-openbsd",260 .name = "sys-openbsd",
275 .entry = "/git/github.com/nektro/zig-sys-openbsd/164646a5e7c4129eb92ac524a60f1759605c99df/openbsd.zig",
276 .main = "openbsd.zig",261 .main = "openbsd.zig",
277 };262 };
278 pub var _kscsl0145t7x = Package{263 pub var _kscsl0145t7x = Package{
279 .store = "/git/github.com/nektro/zig-nio/17c4f044b15917efc1d3f018765881d53fa27e48",264 .store = "/git/github.com/nektro/zig-nio/17c4f044b15917efc1d3f018765881d53fa27e48",
280 .name = "nio",265 .name = "nio",
281 .entry = "/git/github.com/nektro/zig-nio/17c4f044b15917efc1d3f018765881d53fa27e48/nio.zig",
282 .main = "nio.zig",266 .main = "nio.zig",
283 .deps = &[_]*Package{ &_h7tv7ayhffak, &_f7dubzb7cyqe, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },267 .deps = &[_]*Package{ &_h7tv7ayhffak, &_f7dubzb7cyqe, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
284 };268 };
285 pub var _7l3oxw6nqqws = Package{269 pub var _7l3oxw6nqqws = Package{
286 .store = "/git/github.com/nektro/zig-intrusive-parser/800cbe5b241fc52370cb8f892f0d9c6f97133725",270 .store = "/git/github.com/nektro/zig-intrusive-parser/800cbe5b241fc52370cb8f892f0d9c6f97133725",
287 .name = "intrusive-parser",271 .name = "intrusive-parser",
288 .entry = "/git/github.com/nektro/zig-intrusive-parser/800cbe5b241fc52370cb8f892f0d9c6f97133725/intrusive_parser.zig",
289 .main = "intrusive_parser.zig",272 .main = "intrusive_parser.zig",
290 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_kscsl0145t7x },273 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_kscsl0145t7x },
291 };274 };
292 pub var _iecwp4b3bsfm = Package{275 pub var _iecwp4b3bsfm = Package{
293 .store = "/git/github.com/nektro/zig-time/1349fb2c8aaaa1503e8730facea6f87c5fe75dc0",276 .store = "/git/github.com/nektro/zig-time/1349fb2c8aaaa1503e8730facea6f87c5fe75dc0",
294 .name = "time",277 .name = "time",
295 .entry = "/git/github.com/nektro/zig-time/1349fb2c8aaaa1503e8730facea6f87c5fe75dc0/time.zig",
296 .main = "time.zig",278 .main = "time.zig",
297 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6, &_kscsl0145t7x, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },279 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6, &_kscsl0145t7x, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
298 };280 };
299 pub var _vph9l0hxpeze = Package{281 pub var _vph9l0hxpeze = Package{
300 .store = "/git/github.com/nektro/zig-nfs/1a27fe574706f0b91c9f66b22fe7d3fa8f5129d5",282 .store = "/git/github.com/nektro/zig-nfs/1a27fe574706f0b91c9f66b22fe7d3fa8f5129d5",
301 .name = "nfs",283 .name = "nfs",
302 .entry = "/git/github.com/nektro/zig-nfs/1a27fe574706f0b91c9f66b22fe7d3fa8f5129d5/nfs.zig",
303 .main = "nfs.zig",284 .main = "nfs.zig",
304 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },285 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
305 };286 };
306 pub var _2ovav391ivak = Package{287 pub var _2ovav391ivak = Package{
307 .store = "/git/github.com/nektro/zig-detect-license/6de79b4ff8f7462e26f224f4bed3c81710c8893b",288 .store = "/git/github.com/nektro/zig-detect-license/6de79b4ff8f7462e26f224f4bed3c81710c8893b",
308 .name = "detect-license",289 .name = "detect-license",
309 .entry = "/git/github.com/nektro/zig-detect-license/6de79b4ff8f7462e26f224f4bed3c81710c8893b/src/lib.zig",
310 .main = "src/lib.zig",290 .main = "src/lib.zig",
311 .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i, &_vph9l0hxpeze },291 .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i, &_vph9l0hxpeze },
312 };292 };
313 pub var _ede2wygpe1iy = Package{293 pub var _ede2wygpe1iy = Package{
314 .store = "/git/github.com/nektro/zig-tracer/4ad0602d52a3f40ef74f59f648602c61409f7ba7",294 .store = "/git/github.com/nektro/zig-tracer/4ad0602d52a3f40ef74f59f648602c61409f7ba7",
315 .name = "tracer",295 .name = "tracer",
316 .entry = "/git/github.com/nektro/zig-tracer/4ad0602d52a3f40ef74f59f648602c61409f7ba7/src/mod.zig",
317 .main = "src/mod.zig",296 .main = "src/mod.zig",
318 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_vph9l0hxpeze, &_kscsl0145t7x, &_iecwp4b3bsfm },297 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_vph9l0hxpeze, &_kscsl0145t7x, &_iecwp4b3bsfm },
319 };298 };
320 pub var _0k64oe2nuzvj = Package{299 pub var _0k64oe2nuzvj = Package{
321 .store = "/git/github.com/nektro/zig-git/88b94a1960be841bb93a0bca65d556cb6385d1fd",300 .store = "/git/github.com/nektro/zig-git/88b94a1960be841bb93a0bca65d556cb6385d1fd",
322 .name = "git",301 .name = "git",
323 .entry = "/git/github.com/nektro/zig-git/88b94a1960be841bb93a0bca65d556cb6385d1fd/git.zig",
324 .main = "git.zig",302 .main = "git.zig",
325 .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy, &_vph9l0hxpeze, &_kscsl0145t7x, &_0e2d06bb494b },303 .deps = &[_]*Package{ &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_ede2wygpe1iy, &_vph9l0hxpeze, &_kscsl0145t7x, &_0e2d06bb494b },
326 };304 };
327 pub var _ocmr9rtohgcc = Package{305 pub var _ocmr9rtohgcc = Package{
328 .store = "/git/github.com/nektro/zig-json/a731b57ee685ff1ddeea9456a924f45ce4da3031",306 .store = "/git/github.com/nektro/zig-json/a731b57ee685ff1ddeea9456a924f45ce4da3031",
329 .name = "json",307 .name = "json",
330 .entry = "/git/github.com/nektro/zig-json/a731b57ee685ff1ddeea9456a924f45ce4da3031/json.zig",
331 .main = "json.zig",308 .main = "json.zig",
332 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws, &_kscsl0145t7x },309 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_ede2wygpe1iy, &_7l3oxw6nqqws, &_kscsl0145t7x },
333 };310 };
334 pub var _g982zq6e8wsv = Package{311 pub var _g982zq6e8wsv = Package{
335 .store = "/git/github.com/nektro/zig-yaml/dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b",312 .store = "/git/github.com/nektro/zig-yaml/dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b",
336 .name = "yaml",313 .name = "yaml",
337 .entry = "/git/github.com/nektro/zig-yaml/dff9fd43ebf1046c70090bdccfeb2e4f1c0d584b/yaml.zig",
338 .main = "yaml.zig",314 .main = "yaml.zig",
339 .deps = &[_]*Package{ &_8mdbh0zuneb0 },315 .deps = &[_]*Package{ &_8mdbh0zuneb0 },
340 };316 };
...@@ -353,12 +329,10 @@ pub const package_data = struct {...@@ -353,12 +329,10 @@ pub const package_data = struct {
353 pub var _2ta738wrqbaq = Package{329 pub var _2ta738wrqbaq = Package{
354 .store = "/git/github.com/ziglibs/known-folders/207c34a16e4365edc20d92c7892f962b3bed46e8",330 .store = "/git/github.com/ziglibs/known-folders/207c34a16e4365edc20d92c7892f962b3bed46e8",
355 .name = "known-folders",331 .name = "known-folders",
356 .entry = "/git/github.com/ziglibs/known-folders/207c34a16e4365edc20d92c7892f962b3bed46e8/known-folders.zig",
357 .main = "known-folders.zig",332 .main = "known-folders.zig",
358 };333 };
359 pub var _89ujp8gq842x = Package{334 pub var _89ujp8gq842x = Package{
360 .name = "zigmod",335 .name = "zigmod",
361 .entry = "/../..//src/lib.zig",
362 .main = "src/lib.zig",336 .main = "src/lib.zig",
363 .deps = &[_]*Package{ &_g982zq6e8wsv, &_s84v9o48ucb0, &_2ta738wrqbaq, &_0npcrzfdlrvk, &_2ovav391ivak, &_c1xirp1ota5p, &_u7sysdckdymi, &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_0k64oe2nuzvj, &_ocmr9rtohgcc, &_kscsl0145t7x, &_vph9l0hxpeze },337 .deps = &[_]*Package{ &_g982zq6e8wsv, &_s84v9o48ucb0, &_2ta738wrqbaq, &_0npcrzfdlrvk, &_2ovav391ivak, &_c1xirp1ota5p, &_u7sysdckdymi, &_iecwp4b3bsfm, &_f7dubzb7cyqe, &_0k64oe2nuzvj, &_ocmr9rtohgcc, &_kscsl0145t7x, &_vph9l0hxpeze },
364 };338 };
src/cmd/generate.zig+6-9
...@@ -94,11 +94,6 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf...@@ -94,11 +94,6 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
94 \\pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {94 \\pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {
95 \\ const b = exe.step.owner;95 \\ const b = exe.step.owner;
96 \\ const step = b.step("fetch", "");96 \\ const step = b.step("fetch", "");
97 \\ inline for (comptime std.meta.declarations(package_data)) |decl| {
98 \\ const path = &@field(package_data, decl.name).entry;
99 \\ const root = if (@field(package_data, decl.name).store) |_| b.cache_root.path.? else ".";
100 \\ if (path.* != null) path.* = b.fmt("{s}/zigmod/deps{s}", .{ root, path.*.? });
101 \\ }
102 \\97 \\
103 );98 );
104 for (list) |module| {99 for (list) |module| {
...@@ -142,7 +137,6 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf...@@ -142,7 +137,6 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
142 \\var link_lib_c = false;137 \\var link_lib_c = false;
143 \\pub const Package = struct {138 \\pub const Package = struct {
144 \\ name: string = "",139 \\ name: string = "",
145 \\ entry: ?string = null,
146 \\ store: ?string = null,140 \\ store: ?string = null,
147 \\ main: ?string = null,141 \\ main: ?string = null,
148 \\ deps: []const *Package = &.{},142 \\ deps: []const *Package = &.{},
...@@ -173,8 +167,12 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf...@@ -173,8 +167,12 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: [:0]const u8, dir: nf
173 \\ });167 \\ });
174 \\ dummy_library.step.dependOn(fetch_step);168 \\ dummy_library.step.dependOn(fetch_step);
175 \\ var links: u32 = 0;169 \\ var links: u32 = 0;
176 \\ if (self.entry) |capture| {170 \\ if (self.main) |m| {
177 \\ result.root_source_file = .{ .cwd_relative = capture };171 \\ if (self.store) |s| {
172 \\ result.root_source_file = (std.Build.LazyPath{ .cwd_relative = b.cache_root.path.? }).path(b, "zigmod/deps").path(b, s[1..]).path(b, m);
173 \\ } else {
174 \\ result.root_source_file = b.path(m);
175 \\ }
178 \\ }176 \\ }
179 \\ for (self.deps) |item| {177 \\ for (self.deps) |item| {
180 \\ const module_dep = item.module(exe, fetch_step);178 \\ const module_dep = item.module(exe, fetch_step);
...@@ -304,7 +302,6 @@ fn print_pkg_data_to(w: nfs.File, alloc: std.mem.Allocator, cachepath: [:0]const...@@ -304,7 +302,6 @@ fn print_pkg_data_to(w: nfs.File, alloc: std.mem.Allocator, cachepath: [:0]const
304 }302 }
305 if (mod.main.len > 0 and !std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) {303 if (mod.main.len > 0 and !std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) {
306 try w.print(" .name = \"{s}\",\n", .{mod.name});304 try w.print(" .name = \"{s}\",\n", .{mod.name});
307 try w.print(" .entry = \"/{}/{s}/{s}\",\n", .{ u.altStringEscape(fixed_path), try mod.pin(alloc, cachepath, options), mod.main });
308 try w.print(" .main = \"{s}\",\n", .{mod.main});305 try w.print(" .main = \"{s}\",\n", .{mod.main});
309306
310 if (mod.deps.len != 0) {307 if (mod.deps.len != 0) {