make name of thing downloaded part of the step name

This commit is contained in:
Emil Lerch 2025-09-24 08:39:52 -07:00
parent 85234b3df6
commit a9f6d49a26
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -22,7 +22,10 @@ pub fn build(b: *std.Build) !void {
// in this directory.
// We need to use curl for this as the domain doesn't work with zig TLS
const download_link_step = DownloadStep("https://www.link.cs.cmu.edu/link/ftp-site/link-grammar/link-4.1b/unix/link-4.1b.tar.gz").create(b);
const download_link_step = DownloadStep(
"link-4.1b",
"https://www.link.cs.cmu.edu/link/ftp-site/link-grammar/link-4.1b/unix/link-4.1b.tar.gz",
).create(b);
const upstream = download_link_step.dependency(b, .{});
@ -276,7 +279,7 @@ pub fn build(b: *std.Build) !void {
// and reading its source code will allow you to master it.
}
fn DownloadStep(comptime link: []const u8) type {
fn DownloadStep(comptime name: []const u8, comptime link: []const u8) type {
return struct {
step: std.Build.Step,
builder: *std.Build,
@ -329,7 +332,7 @@ fn DownloadStep(comptime link: []const u8) type {
self.* = .{
.step = std.Build.Step.init(.{
.id = .custom,
.name = "download-model",
.name = "download " ++ name,
.owner = builder,
.makeFn = make,
}),