begin 0.13 update process -- very broken

This commit is contained in:
Mitchell Hashimoto
2024-06-08 19:51:44 -07:00
parent c69dc0e0e1
commit c6f5b30f0d
18 changed files with 76 additions and 58 deletions

View File

@ -1017,7 +1017,7 @@ fn addDeps(
// on x86_64.
if (step.rootModuleTarget().os.tag == .linux) {
const triple = try step.rootModuleTarget().linuxTriple(b.allocator);
step.addLibraryPath(.{ .path = b.fmt("/usr/lib/{s}", .{triple}) });
step.addLibraryPath(b.path(b.fmt("/usr/lib/{s}", .{triple})));
}
// C files

View File

@ -5,8 +5,8 @@
.dependencies = .{
// Zig libs
.libxev = .{
.url = "https://github.com/mitchellh/libxev/archive/b3f9918776b8700b337b7ebe769060328fe246b0.tar.gz",
.hash = "122044caf67c7833c7110dc93531031899e459a6818ed125a0bcfdb0b5243bd7700b",
.url = "https://github.com/mitchellh/libxev/archive/f6a672a78436d8efee1aa847a43a900ad773618b.tar.gz",
.hash = "12207b7a5b538ffb7fb18f954ae17d2f8490b6e3778a9e30564ad82c58ee8da52361",
},
.mach_glfw = .{
.url = "https://github.com/mitchellh/mach-glfw/archive/20c773d86df269722d8926f98bc8af26ebd90999.tar.gz",

38
flake.lock generated
View File

@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@ -33,12 +33,15 @@
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
@ -49,7 +52,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
@ -168,6 +171,21 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": "flake-compat",
@ -177,11 +195,11 @@
]
},
"locked": {
"lastModified": 1713659103,
"narHash": "sha256-WgWH0HPGsxd7Ov5M4Ug7qjmxbTeG8517xO6hY3198tU=",
"lastModified": 1717848532,
"narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "a13735003a235a2e4e202b47277129f99bfc9294",
"rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43",
"type": "github"
},
"original": {

View File

@ -36,7 +36,7 @@
inherit (pkgs-unstable) tracy;
inherit (zls.packages.${system}) zls;
zig = zig.packages.${system}."0.12.0";
zig = zig.packages.${system}."0.13.0";
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
};

View File

@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("cimgui", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -30,7 +30,7 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(imgui.path(""));
module.addIncludePath(.{ .path = "vendor" });
module.addIncludePath(b.path("vendor"));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -49,7 +49,7 @@ pub fn build(b: *std.Build) !void {
});
}
lib.addCSourceFile(.{ .file = .{ .path = "vendor/cimgui.cpp" }, .flags = flags.items });
lib.addCSourceFile(.{ .file = b.path("vendor/cimgui.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui_draw.cpp"), .flags = flags.items });
lib.addCSourceFile(.{ .file = imgui.path("imgui_demo.cpp"), .flags = flags.items });
@ -80,7 +80,7 @@ pub fn build(b: *std.Build) !void {
}
lib.installHeadersDirectory(
.{ .path = "vendor" },
b.path("vendor"),
"",
.{ .include_extensions = &.{".h"} },
);
@ -89,7 +89,7 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -13,7 +13,7 @@ pub fn build(b: *std.Build) !void {
) orelse (target.result.os.tag != .windows);
const freetype_enabled = b.option(bool, "enable-freetype", "Build freetype") orelse true;
const module = b.addModule("fontconfig", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("fontconfig", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("fontconfig", .{});
const lib = b.addStaticLibrary(.{
@ -39,9 +39,9 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "override/include" });
lib.addIncludePath(b.path("override/include"));
module.addIncludePath(upstream.path(""));
module.addIncludePath(.{ .path = "override/include" });
module.addIncludePath(b.path("override/include"));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -172,7 +172,7 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const libpng_enabled = b.option(bool, "enable-libpng", "Build libpng") orelse false;
const module = b.addModule("freetype", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("freetype", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("freetype", .{});
const lib = b.addStaticLibrary(.{
@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
}
module.addIncludePath(upstream.path("include"));
module.addIncludePath(.{ .path = "" });
module.addIncludePath(b.path(""));
// Dependencies
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
@ -81,7 +81,7 @@ pub fn build(b: *std.Build) !void {
}),
}
lib.installHeader(.{ .path = "freetype-zig.h" }, "freetype-zig.h");
lib.installHeader(b.path("freetype-zig.h"), "freetype-zig.h");
lib.installHeadersDirectory(
upstream.path("include"),
"",
@ -93,7 +93,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("glslang", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
b.installArtifact(lib);
module.addIncludePath(upstream.path(""));
module.addIncludePath(.{ .path = "override" });
module.addIncludePath(b.path("override"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
try apple_sdk.addPaths(b, module);
@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -52,7 +52,7 @@ fn buildGlslang(
lib.linkLibC();
lib.linkLibCpp();
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "override" });
lib.addIncludePath(b.path("override"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
try apple_sdk.addPaths(b, &lib.root_module);

View File

@ -17,7 +17,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("harfbuzz", .{});
const module = b.addModule("harfbuzz", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
@ -91,7 +91,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("highway", .{});
const module = b.addModule("highway", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -95,7 +95,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -23,7 +23,7 @@ pub fn build(b: *std.Build) !void {
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
lib.linkLibrary(zlib_dep.artifact("z"));
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "" });
lib.addIncludePath(b.path(""));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -40,7 +40,7 @@ pub fn build(b: *std.Build) !void {
.flags = flags.items,
});
lib.installHeader(.{ .path = "pnglibconf.h" }, "pnglibconf.h");
lib.installHeader(b.path("pnglibconf.h"), "pnglibconf.h");
lib.installHeadersDirectory(
upstream.path(""),
"",

View File

@ -14,12 +14,12 @@ pub fn build(b: *std.Build) !void {
lib.linkLibC();
lib.addIncludePath(upstream.path("include"));
lib.addIncludePath(.{ .path = "override/include" });
lib.addIncludePath(b.path("override/include"));
if (target.result.os.tag == .windows) {
lib.addIncludePath(.{ .path = "override/config/win32" });
lib.addIncludePath(b.path("override/config/win32"));
lib.linkSystemLibrary("ws2_32");
} else {
lib.addIncludePath(.{ .path = "override/config/posix" });
lib.addIncludePath(b.path("override/config/posix"));
}
var flags = std.ArrayList([]const u8).init(b.allocator);
@ -101,7 +101,7 @@ pub fn build(b: *std.Build) !void {
});
lib.installHeader(
.{ .path = "override/include/libxml/xmlversion.h" },
b.path("override/include/libxml/xmlversion.h"),
"libxml/xmlversion.h",
);
lib.installHeadersDirectory(

View File

@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("macos", .{
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});
@ -21,11 +21,11 @@ pub fn build(b: *std.Build) !void {
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
lib.addCSourceFile(.{
.file = .{ .path = "os/log.c" },
.file = b.path("os/log.c"),
.flags = flags.items,
});
lib.addCSourceFile(.{
.file = .{ .path = "text/ext.c" },
.file = b.path("text/ext.c"),
.flags = flags.items,
});
lib.linkFramework("CoreFoundation");
@ -55,7 +55,7 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("oniguruma", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("oniguruma", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("oniguruma", .{});
const lib = try buildOniguruma(b, upstream, target, optimize);
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -1,6 +1,6 @@
const std = @import("std");
pub fn build(b: *std.Build) !void {
const module = b.addModule("opengl", .{ .root_source_file = .{ .path = "main.zig" } });
module.addIncludePath(.{ .path = "../../vendor/glad/include" });
const module = b.addModule("opengl", .{ .root_source_file = b.path("main.zig") });
module.addIncludePath(b.path("../../vendor/glad/include"));
}

View File

@ -4,7 +4,7 @@ pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const module = b.addModule("pixman", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("pixman", .{ .root_source_file = b.path("main.zig") });
const upstream = b.dependency("pixman", .{});
const lib = b.addStaticLibrary(.{
@ -22,9 +22,9 @@ pub fn build(b: *std.Build) !void {
}
lib.addIncludePath(upstream.path(""));
lib.addIncludePath(.{ .path = "" });
lib.addIncludePath(b.path(""));
module.addIncludePath(upstream.path("pixman"));
module.addIncludePath(.{ .path = "" });
module.addIncludePath(b.path(""));
var flags = std.ArrayList([]const u8).init(b.allocator);
defer flags.deinit();
@ -62,7 +62,7 @@ pub fn build(b: *std.Build) !void {
.flags = flags.items,
});
lib.installHeader(.{ .path = "pixman-version.h" }, "pixman-version.h");
lib.installHeader(b.path("pixman-version.h"), "pixman-version.h");
lib.installHeadersDirectory(
upstream.path("pixman"),
"",
@ -74,7 +74,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});

View File

@ -10,7 +10,7 @@ pub fn build(b: *std.Build) !void {
.optimize = optimize,
});
lib.linkLibCpp();
lib.addIncludePath(.{ .path = "vendor" });
lib.addIncludePath(b.path("vendor"));
if (target.result.isDarwin()) {
const apple_sdk = @import("apple_sdk");
@ -28,7 +28,7 @@ pub fn build(b: *std.Build) !void {
},
});
lib.installHeadersDirectory(
.{ .path = "vendor" },
b.path("vendor"),
"",
.{ .include_extensions = &.{".h"} },
);

View File

@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
const upstream = b.dependency("spirv_cross", .{});
const module = b.addModule("spirv_cross", .{ .root_source_file = .{ .path = "main.zig" } });
const module = b.addModule("spirv_cross", .{ .root_source_file = b.path("main.zig") });
module.addIncludePath(upstream.path(""));
const lib = try buildSpirvCross(b, upstream, target, optimize);
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
.root_source_file = .{ .path = "main.zig" },
.root_source_file = b.path("main.zig"),
.target = target,
.optimize = optimize,
});