view third_party/mercurial/runtime.bzl @ 278:8d560f50ed4c

Improve infinite canvas interactions and browser chrome Render Lucide icons directly with Raylib, add searchable icon browsing, robust text editing, entity lifecycle animations, z-order-safe input, semantic themes, and animated editable browser controls. Document rendering, pinning, context, and component extension for future agents. Co-authored-by: Copilot <[email protected]> Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:16:14 -0700
parents c5129452493e
children
line wrap: on
line source

def _mercurial_runtime_impl(ctx):
    output = ctx.actions.declare_directory(ctx.label.name)
    ctx.actions.run_shell(
        inputs = [ctx.file.archive, ctx.file.launcher],
        outputs = [output],
        command = """
set -e
mkdir -p {output}/bin
unzip -q {archive} -d {output}
cp {output}/mercurial-7.2.3.dist-info/licenses/COPYING {output}/COPYING
cp {launcher} {output}/bin/hg
chmod 0555 {output}/bin/hg
chmod -R a-w {output}/hgdemandimport {output}/hgext {output}/mercurial
""".format(
            archive = ctx.file.archive.path,
            launcher = ctx.file.launcher.path,
            output = output.path,
        ),
        progress_message = "Assembling pure-Python Mercurial runtime",
    )
    return [
        DefaultInfo(
            files = depset([output]),
            runfiles = ctx.runfiles(files = [output]),
        ),
    ]

mercurial_runtime = rule(
    implementation = _mercurial_runtime_impl,
    attrs = {
        "archive": attr.label(allow_single_file = True, mandatory = True),
        "launcher": attr.label(allow_single_file = True, mandatory = True),
    },
)