diff --git a/build.zig b/build.zig index 84a0c5476..26306ae6c 100644 --- a/build.zig +++ b/build.zig @@ -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 diff --git a/build.zig.zon b/build.zig.zon index 80d9c6fcf..ab4008a30 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,8 +5,8 @@ .dependencies = .{ // Zig libs .libxev = .{ - .url = "https://github.com/mitchellh/libxev/archive/efde8a170836334901ed2d59c98bf832eb48ae3a.tar.gz", - .hash = "1220bf10f4fc109ca0b50520075e2e730900956e220adee616a01f3f91bc8a802695", + .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", diff --git a/flake.lock b/flake.lock index 41477c510..5b0570c08 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -197,11 +213,11 @@ ] }, "locked": { - "lastModified": 1719231019, - "narHash": "sha256-ZHU2A+xs7I5rqDagBtnGPc+GyIwhMaa8Za9h+8qTCiw=", + "lastModified": 1717848532, + "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "1141abbf0c667677569c887bfbb1500039b5295e", + "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7fce24dfe..f8a7f57b7 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ inherit (pkgs-unstable) tracy; inherit (zls.packages.${system}) zls; - zig = zig.packages.${system}."0.12.1"; + zig = zig.packages.${system}."0.13.0"; wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {}; }; diff --git a/pkg/cimgui/build.zig b/pkg/cimgui/build.zig index 6a3607cf5..94163ed98 100644 --- a/pkg/cimgui/build.zig +++ b/pkg/cimgui/build.zig @@ -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, }); diff --git a/pkg/fontconfig/build.zig b/pkg/fontconfig/build.zig index 2882eae96..ed66d61a5 100644 --- a/pkg/fontconfig/build.zig +++ b/pkg/fontconfig/build.zig @@ -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, }); diff --git a/pkg/freetype/build.zig b/pkg/freetype/build.zig index 9819c5328..f62c6e487 100644 --- a/pkg/freetype/build.zig +++ b/pkg/freetype/build.zig @@ -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, }); diff --git a/pkg/glslang/build.zig b/pkg/glslang/build.zig index e25fd67ee..35cffc01e 100644 --- a/pkg/glslang/build.zig +++ b/pkg/glslang/build.zig @@ -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); diff --git a/pkg/harfbuzz/build.zig b/pkg/harfbuzz/build.zig index 45d242699..bc44be1a0 100644 --- a/pkg/harfbuzz/build.zig +++ b/pkg/harfbuzz/build.zig @@ -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, }); diff --git a/pkg/highway/build.zig b/pkg/highway/build.zig index 1ef08de79..93d76876b 100644 --- a/pkg/highway/build.zig +++ b/pkg/highway/build.zig @@ -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, }); diff --git a/pkg/libpng/build.zig b/pkg/libpng/build.zig index e5bcf5963..6d3487071 100644 --- a/pkg/libpng/build.zig +++ b/pkg/libpng/build.zig @@ -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(""), "", diff --git a/pkg/libxml2/build.zig b/pkg/libxml2/build.zig index 430bfdb54..7db637774 100644 --- a/pkg/libxml2/build.zig +++ b/pkg/libxml2/build.zig @@ -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( diff --git a/pkg/macos/build.zig b/pkg/macos/build.zig index a9e3f6913..a154b24fa 100644 --- a/pkg/macos/build.zig +++ b/pkg/macos/build.zig @@ -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, }); diff --git a/pkg/oniguruma/build.zig b/pkg/oniguruma/build.zig index d973c89df..703b0a387 100644 --- a/pkg/oniguruma/build.zig +++ b/pkg/oniguruma/build.zig @@ -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, }); diff --git a/pkg/opengl/build.zig b/pkg/opengl/build.zig index 440b96ba0..f472053ed 100644 --- a/pkg/opengl/build.zig +++ b/pkg/opengl/build.zig @@ -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")); } diff --git a/pkg/pixman/build.zig b/pkg/pixman/build.zig index f993ba46f..b1338ed25 100644 --- a/pkg/pixman/build.zig +++ b/pkg/pixman/build.zig @@ -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, }); diff --git a/pkg/simdutf/build.zig b/pkg/simdutf/build.zig index bc53b30be..784d7cce1 100644 --- a/pkg/simdutf/build.zig +++ b/pkg/simdutf/build.zig @@ -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"} }, ); diff --git a/pkg/spirv-cross/build.zig b/pkg/spirv-cross/build.zig index be18f3043..8281a5df1 100644 --- a/pkg/spirv-cross/build.zig +++ b/pkg/spirv-cross/build.zig @@ -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, });