Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ manual/t*.fls
compile_commands.json
.zig-cache
zig-out
zig-pkg
result
9 changes: 4 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ pub fn build(b: *std.Build) !void {
})) |dependency| {
embed_exe.root_module.linkLibrary(dependency.artifact("lz4"));
}
embed_exe.addCSourceFile(.{
embed_exe.root_module.addCSourceFile(.{
.file = b.path("profiler/helpers/embed.cpp"),
.flags = &.{"-std=c++20"},
});
Expand Down Expand Up @@ -489,10 +489,10 @@ pub fn build(b: *std.Build) !void {
const wayland_protocols_dir: ?std.Build.LazyPath = if (use_system_wayland_protocols) blk: {
var code: u8 = undefined;
const pkgdatadir = if (b.runAllowFail(&[_][]const u8{
b.graph.env_map.get("PKG_CONFIG") orelse "pkg-config",
b.graph.environ_map.get("PKG_CONFIG") orelse "pkg-config",
"wayland-protocols",
"--variable=pkgdatadir",
}, &code, .Ignore)) |stdout| stdout else |err| switch (err) {
}, &code, .ignore)) |stdout| stdout else |err| switch (err) {
error.ProcessTerminated => return error.PkgConfigCrashed,
error.ExecNotSupported => return error.PkgConfigFailed,
error.ExitCodeFailure => return error.PkgConfigFailed,
Expand Down Expand Up @@ -907,7 +907,7 @@ fn createImgui(
link_system_glfw: bool,
link_system_freetype: bool,
) *std.Build.Step.Compile {
const enable_freetype: bool = false;
const enable_freetype: bool = true;

const upstream = b.dependency("imgui", .{});
const imgui = b.addLibrary(.{
Expand Down Expand Up @@ -963,7 +963,6 @@ fn createImgui(
} else if (b.lazyDependency("freetype", .{
.target = options.target.?,
.optimize = options.optimize.?,
.enable_brotli = false,
})) |freetype_dependency| {
imgui.root_module.linkLibrary(freetype_dependency.artifact("freetype"));
}
Expand Down
36 changes: 18 additions & 18 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
.name = .tracy,
.version = "0.13.1",
.fingerprint = 0x255a89eecd27f4ce, // Changing this has security and trust implications.
.minimum_zig_version = "0.15.1",
.minimum_zig_version = "0.16.0",
.dependencies = .{
.glfw = .{ // glfw ported to the zig build system
.url = "git+https://github.com/Techatrix/glfw.git#5ab24844c4982f1665985bd2a808a62c8cbeb97b",
.hash = "glfw-3.4.0-yvF4PIFDMwBvlU52tuJU9_ijSCazcLeWvYsdaBJm7HQ6",
.url = "git+https://github.com/Techatrix/glfw.git#17493bf1da7b77c7554b577917ce2a2febf265a2",
.hash = "glfw-3.4.0-yvF4PGJSLwB4PwLFVcTxcixsw57WFurDn9CON4cIbf-H",
.lazy = true,
},
.capstone = .{ // Availability for capstone as Zig dependency
.url = "git+https://github.com/allyourcodebase/capstone.git#90c3e2512286b077631da5361708562e333ae856",
.hash = "capstone-6.0.0-Alpha4-tmNUgdI8AADDVL-qUUVmU0IGuFGpjz6-O7sBRjeB53yb",
.url = "git+https://github.com/allyourcodebase/capstone.git#586dd00c4fd1615f4af7e603376dd13b683a25aa",
.hash = "capstone-6.0.0-Alpha4-tmNUgQE9AABNw_9iAfvi1hPfRVFKQsw2bqWVXOeM7Kqz",
.lazy = true,
},
.curl = .{ // curl ported to the zig build system
.url = "git+https://github.com/allyourcodebase/curl.git#fc863d6cbc4a694ff5bb11fc59470142c8682e2b",
.hash = "curl-8.18.0-mFDAWK_0AABsv8MPtSIjAPCVElXbt1vbzgBOs7plIlUJ",
.url = "git+https://github.com/allyourcodebase/curl.git#ab30a38bc47c8ad83ec7016f4ae3af1958d76ac3",
.hash = "curl-8.18.0-mFDAWOf0AAAE2R408-AD3oi63paK_MBWcxkqR6zkNsmL",
.lazy = true,
},
.zstd = .{ // zstd ported to the zig build system
.url = "git+https://github.com/allyourcodebase/zstd.git?ref=1.5.7#01327d49cbc56dc24c20a167bb0055d7fc23de84",
.hash = "zstd-1.5.7-KEItkJ8vAAC5_rRlKmLflYQ-eKXbAIQBWZNmmJtS18q0",
.url = "git+https://github.com/allyourcodebase/zstd.git?ref=1.5.7-1#e1a501be57f42c541e8a5597e4b59a074dfd09a3",
.hash = "zstd-1.5.7-1-KEItkAMwAAD6OKY3m0OOmXG7aL-aLUfrDqbP5J5oYapU",
.lazy = true,
},
.lz4 = .{ // lz4 ported to the zig build system
Expand All @@ -34,14 +34,14 @@
.hash = "nativefiledialog_extended-1.2.1-2-_pDry5gcAAA701XtymPdScWmrLQ5Zuw9yZYm_bxp7DkQ",
.lazy = true,
},
// .freetype = .{ // A fork of freetype packaged for the Zig build system
// .url = "git+https://github.com/hexops/freetype.git#972cd37bccecae2cc9f54cf0b562263a13209d02",
// .hash = "freetype-0.0.0-AAAAAA5JcwBMujojfNLEq5g_WijZtU56mRLYx8bjjiMU",
// .lazy = true,
// },
.freetype = .{
.url = "git+https://code.hexops.org/hexops/freetype.git#c4188e125fd4e8c84d49b619f4f409fde52ff1d0",
.hash = "freetype-0.0.0-Oa073aKZdgBGGFCSwR0IWkb5oV2rgBGAHeTnXIejmo0k",
.lazy = true,
},
.wayland = .{
.url = "git+https://github.com/allyourcodebase/wayland.git?ref=1.24.0-3#c3e9e7b92a135badb24643da7be8a441a060af9d",
.hash = "wayland-1.24.0-3-dxEBa6N9AAD5fW7Hq-V8ngPRpUTky6PmnHxVFRPvn1aI",
.url = "git+https://github.com/allyourcodebase/wayland.git?ref=1.24.0-4#1a08737f01842c2c11fd2d22bec795ffcd7fec67",
.hash = "wayland-1.24.0-4-dxEBa-N8AABxP_wW0QMcnzmY_h_P1sqtpY9tenhmLz10",
.lazy = true,
},
.wayland_protocols = .{
Expand All @@ -50,8 +50,8 @@
.lazy = true,
},
.libxkbcommon = .{
.url = "git+https://github.com/allyourcodebase/libxkbcommon.git?ref=1.11.0-1#809157d5118909298f3e086fa8d8103198e938fd",
.hash = "libxkbcommon-1.11.0-1-93LaF6pwAgDFoaLfOkR8ioG4RVcDHbBhsDmC_rYwyOEG",
.url = "git+https://github.com/allyourcodebase/libxkbcommon.git?ref=1.13.1#8c31126430bec39d2cb5f06aa3c2667e006b32ea",
.hash = "libxkbcommon-1.13.1-93LaF2x7AgDgSrr8xjRYrYGhtGhJKcZMuID3M95APvl1",
.lazy = true,
},

Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
}:
linkFarm "zig-packages" [
{
name = "capstone-6.0.0-Alpha4-tmNUgdI8AADDVL-qUUVmU0IGuFGpjz6-O7sBRjeB53yb";
name = "capstone-6.0.0-Alpha4-tmNUgQE9AABNw_9iAfvi1hPfRVFKQsw2bqWVXOeM7Kqz";
path = fetchgit {
url = "https://github.com/allyourcodebase/capstone";
rev = "90c3e2512286b077631da5361708562e333ae856";
hash = "sha256-jqYbCviAAmW8XL45zpTKYKrupsa315KP0DGxVSgtqxE=";
rev = "586dd00c4fd1615f4af7e603376dd13b683a25aa";
hash = "sha256-erARsyTMq2JN2BYUnsPf8jrH9UHD4afzvTmkmQcRZmY=";
};
}
{
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
system: let
pkgs = nixpkgs.legacyPackages.${system};
deps = pkgs.callPackage ./build.zig.zon.nix {};
zig_hook = pkgs.zig_0_15.hook.overrideAttrs {
zig_hook = pkgs.zig_0_16.hook.overrideAttrs {
zig_default_flags = "-Doptimize=ReleaseFast -Dcpu=baseline --color off";
};
fs = pkgs.lib.fileset;
Expand Down Expand Up @@ -48,9 +48,8 @@
]
);
};
dontConfigure = true;
buildInputs = with pkgs;
[curl zstd lz4 gtk3 dbus]
[curl zstd lz4 freetype gtk3 dbus]
++ lib.optionals (stdenv.hostPlatform.isLinux) [libxkbcommon];
nativeBuildInputs = with pkgs;
[zig_hook pkg-config makeWrapper]
Expand All @@ -66,7 +65,7 @@
buildInputs = with pkgs;
[gtk3 dbus]
++ lib.optionals (stdenv.hostPlatform.isLinux) [libxkbcommon];
nativeBuildInputs = with pkgs; [zig_hook pkg-config];
nativeBuildInputs = with pkgs; [zig_0_16 pkg-config];
# shellHook = ''
# export XKB_CONFIG_ROOT=${pkgs.xkeyboard_config}/etc/X11/xkb
# export XLOCALEDIR=${pkgs.xorg.libX11.out}/share/X11/locale
Expand Down
Loading