Something went wrong. Try again.
fork of natecraddock/ziglua, translate-c pinned for zig 0.17
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637const std = @import("std");
const Build = std.Build;const Step = std.Build.Step;
const PatchFile = struct { run: *Step.Run, output: Build.LazyPath,};
pub fn applyPatchToFile( b: *Build, target: Build.ResolvedTarget, file: Build.LazyPath, patch_file: Build.LazyPath, output_file: []const u8,) PatchFile { const patch = b.addExecutable(.{ .name = "patch", .root_module = b.createModule(.{ .root_source_file = b.path("build/patch.zig"), .target = target, }), });
const patch_run = b.addRunArtifact(patch); patch_run.addFileArg(file); patch_run.addFileArg(patch_file);
const out = patch_run.addOutputFileArg(output_file);
return .{ .run = patch_run, .output = out, };}