From 7592380857dda1267bf3d3124e2eb4d0a7264161 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 9 Jun 2026 01:20:26 +0800 Subject: [PATCH] feat: add CN mirror (mcpp-res) with GLOBAL/CN url tables Mirror every package resource to the gitcode `mcpp-res` org and switch each descriptor's download `url` to a `{ GLOBAL=..., CN=... }` table per the xpkg V1 spec (resolution priority GLOBAL > CN, so default behavior is unchanged). Select with `mcpp self config --mirror CN|GLOBAL`. - 50 resources across 35 mcpp-res repos, each published as a release asset (https://gitcode.com/mcpp-res//releases/download//), byte-identical to the upstream source (same sha256). - 37 descriptors rewritten (120 url fields). - validate CI: lint mirror tables (tests/check_mirror_urls.lua) + probe every CN asset is reachable (mirror-cn-reachable job, tests/list_cn_urls.lua). - README: document the GLOBAL/CN mirror + mcpp-res org. --- .github/workflows/validate.yml | 39 +++++++++++++++ README.md | 33 +++++++++++++ pkgs/c/capi.lua.lua | 15 ++++-- pkgs/c/cmdline.lua | 30 +++++++++--- pkgs/c/compat.bzip2.lua | 15 ++++-- pkgs/c/compat.ftxui.lua | 15 ++++-- pkgs/c/compat.glfw.lua | 15 ++++-- pkgs/c/compat.glx-runtime.lua | 5 +- pkgs/c/compat.gtest.lua | 15 ++++-- pkgs/c/compat.imgui.lua | 30 +++++++++--- pkgs/c/compat.khrplatform.lua | 15 ++++-- pkgs/c/compat.libarchive.lua | 15 ++++-- pkgs/c/compat.lua.lua | 15 ++++-- pkgs/c/compat.lz4.lua | 15 ++++-- pkgs/c/compat.mbedtls.lua | 15 ++++-- pkgs/c/compat.opengl.lua | 15 ++++-- pkgs/c/compat.x11.lua | 5 +- pkgs/c/compat.xau.lua | 5 +- pkgs/c/compat.xcb-proto.lua | 5 +- pkgs/c/compat.xcb.lua | 5 +- pkgs/c/compat.xcursor.lua | 5 +- pkgs/c/compat.xdmcp.lua | 5 +- pkgs/c/compat.xext.lua | 5 +- pkgs/c/compat.xfixes.lua | 5 +- pkgs/c/compat.xi.lua | 5 +- pkgs/c/compat.xinerama.lua | 5 +- pkgs/c/compat.xorgproto.lua | 5 +- pkgs/c/compat.xrandr.lua | 5 +- pkgs/c/compat.xrender.lua | 5 +- pkgs/c/compat.xtrans.lua | 5 +- pkgs/c/compat.xz.lua | 15 ++++-- pkgs/c/compat.zlib.lua | 15 ++++-- pkgs/c/compat.zstd.lua | 15 ++++-- pkgs/i/imgui.lua | 90 +++++++++++++++++++++++++++------- pkgs/l/llmapi.lua | 45 +++++++++++++---- pkgs/m/mcpplibs.capi.lua.lua | 15 ++++-- pkgs/t/templates.lua | 15 ++++-- pkgs/t/tinyhttps.lua | 45 +++++++++++++---- pkgs/x/xpkg.lua | 45 +++++++++++++---- tests/check_mirror_urls.lua | 63 ++++++++++++++++++++++++ tests/list_cn_urls.lua | 33 +++++++++++++ 41 files changed, 648 insertions(+), 120 deletions(-) create mode 100644 tests/check_mirror_urls.lua create mode 100644 tests/list_cn_urls.lua diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 20598c1..5a6cf75 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -41,10 +41,49 @@ jobs: echo "::error file=$f::version identifiers must not use a leading v" fail=1 fi + # 4. Mirror table sanity: when a download `url` is written as a + # { GLOBAL=..., CN=... } table, both regions must be present and + # the CN entry must point at the gitcode mcpp-res mirror. + if ! lua5.4 tests/check_mirror_urls.lua "$f"; then + fail=1 + fi done [ $fail -eq 0 ] && echo "All package files valid." exit $fail + mirror-cn-reachable: + # Closed-loop guard for the CN mirror: every CN url referenced by a + # descriptor must be a live, downloadable gitcode release asset. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install lua + run: sudo apt-get install -y --no-install-recommends lua5.4 + - name: Check CN mirror assets are reachable + run: | + fail=0 + # collect unique CN urls across all descriptors + : > /tmp/cn.tsv + for f in pkgs/*/*.lua; do + lua5.4 tests/list_cn_urls.lua "$f" >> /tmp/cn.tsv || true + done + sort -u /tmp/cn.tsv -o /tmp/cn.tsv + total=$(grep -c . /tmp/cn.tsv || true) + echo "checking $total CN mirror url(s)" + while IFS=$'\t' read -r url sha; do + [ -z "$url" ] && continue + # follow redirects; gitcode release assets resolve to object storage + code=$(curl -fsSL -o /dev/null -w '%{http_code}' --retry 2 --max-time 60 "$url" || echo "000") + if [ "$code" != "200" ]; then + echo "::error::CN mirror unreachable ($code): $url" + fail=1 + else + echo "ok: $url" + fi + done < /tmp/cn.tsv + [ $fail -eq 0 ] && echo "All CN mirror urls reachable." + exit $fail + smoke-linux: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index d2022ee..9a20d35 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,38 @@ package = { } ``` +### 镜像源(GLOBAL / CN) + +`xpm.<平台>.<版本>.url` 除了普通字符串,还支持镜像表,为不同地区提供下载源: + +```lua +["3.6.1"] = { + url = { + GLOBAL = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mbedtls/releases/download/3.6.1/mbedtls-3.6.1.tar.gz", + }, + sha256 = "db75d2f7f35e29cf09f7bd6734d8ee3325f29c298ef071350c5e70a40dd4f0f9", +}, +``` + +- **GLOBAL**(默认):上游原始地址(GitHub / 官方站点),行为与之前完全一致。 +- **CN**:[`mcpp-res`](https://gitcode.com/mcpp-res) 组织在 gitcode 上的镜像 — + 每个库一个仓库,资源以 release 资产形式按版本 tag 发布,URL 形如 + `https://gitcode.com/mcpp-res/<库>/releases/download/<版本>/<库>-<版本>.`。 + CN 镜像内容与 GLOBAL 源 **逐字节一致**(同一 `sha256`),只是托管在国内可 + 快速访问的 gitcode 上。 + +切换镜像(底层透传给 xlings 安装引擎): + +```bash +mcpp self config --mirror CN # 使用国内镜像 +mcpp self config --mirror GLOBAL # 使用上游源(默认) +``` + +> 镜像表遵循 [xpkg V1 规范](https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md) +> 的 `url = { GLOBAL=..., CN=... }` 约定,解析优先级 `GLOBAL > CN`。`validate` +> workflow 会校验镜像表完整性并探测每个 CN 资源可达。 + ### 获取方式 mcpp 初次运行时自动 clone 本仓库到 `~/.mcpp/registry/data/mcpp-index/`。后续更新: @@ -231,6 +263,7 @@ cd ~/.mcpp/registry/data/mcpp-index && git pull | [xlings](https://github.com/d2learn/xlings) | mcpp 底层的包安装引擎 + 沙箱环境 | | [xpkg V1 spec](https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md) | 包描述文件规范 | | [mcpplibs](https://github.com/mcpplibs) | mcpp 生态的模块化 C++23 库集合 | +| [mcpp-res](https://gitcode.com/mcpp-res) | 包资源的 CN 镜像组织(gitcode release 资产) | | [xim-pkgindex](https://github.com/d2learn/xim-pkgindex) | xlings 的通用包索引仓库 | ## 社区 diff --git a/pkgs/c/capi.lua.lua b/pkgs/c/capi.lua.lua index 54ceecb..ad22940 100644 --- a/pkgs/c/capi.lua.lua +++ b/pkgs/c/capi.lua.lua @@ -13,19 +13,28 @@ package = { xpm = { linux = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, macosx = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, windows = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, diff --git a/pkgs/c/cmdline.lua b/pkgs/c/cmdline.lua index 93aef5e..08aa79c 100644 --- a/pkgs/c/cmdline.lua +++ b/pkgs/c/cmdline.lua @@ -20,31 +20,49 @@ package = { xpm = { linux = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.1/cmdline-0.0.1.tar.gz", + }, sha256 = "3fb2f5495c1a144485b3cbb2e43e27059151633460f702af0f3851cbff387ef0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.2/cmdline-0.0.2.tar.gz", + }, sha256 = "4f3e2b8dc4d9f11bdd9a784a9914e889234ac305e1020282ffa03f506b75d52a", }, }, macosx = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.1/cmdline-0.0.1.tar.gz", + }, sha256 = "3fb2f5495c1a144485b3cbb2e43e27059151633460f702af0f3851cbff387ef0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.2/cmdline-0.0.2.tar.gz", + }, sha256 = "4f3e2b8dc4d9f11bdd9a784a9914e889234ac305e1020282ffa03f506b75d52a", }, }, windows = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.1/cmdline-0.0.1.tar.gz", + }, sha256 = "3fb2f5495c1a144485b3cbb2e43e27059151633460f702af0f3851cbff387ef0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.0.2/cmdline-0.0.2.tar.gz", + }, sha256 = "4f3e2b8dc4d9f11bdd9a784a9914e889234ac305e1020282ffa03f506b75d52a", }, }, diff --git a/pkgs/c/compat.bzip2.lua b/pkgs/c/compat.bzip2.lua index 46b70dc..ce81902 100644 --- a/pkgs/c/compat.bzip2.lua +++ b/pkgs/c/compat.bzip2.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + url = { + GLOBAL = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/bzip2/releases/download/1.0.8/bzip2-1.0.8.tar.gz", + }, sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", }, }, macosx = { ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + url = { + GLOBAL = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/bzip2/releases/download/1.0.8/bzip2-1.0.8.tar.gz", + }, sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", }, }, windows = { ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + url = { + GLOBAL = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/bzip2/releases/download/1.0.8/bzip2-1.0.8.tar.gz", + }, sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", }, }, diff --git a/pkgs/c/compat.ftxui.lua b/pkgs/c/compat.ftxui.lua index 9a816bf..577a258 100644 --- a/pkgs/c/compat.ftxui.lua +++ b/pkgs/c/compat.ftxui.lua @@ -20,19 +20,28 @@ package = { xpm = { linux = { ["6.1.9"] = { - url = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + url = { + GLOBAL = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/ftxui/releases/download/6.1.9/ftxui-6.1.9.tar.gz", + }, sha256 = "45819c1e54914783d4a1ca5633885035d74146778a1f74e1213cdb7b76340e71", }, }, macosx = { ["6.1.9"] = { - url = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + url = { + GLOBAL = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/ftxui/releases/download/6.1.9/ftxui-6.1.9.tar.gz", + }, sha256 = "45819c1e54914783d4a1ca5633885035d74146778a1f74e1213cdb7b76340e71", }, }, windows = { ["6.1.9"] = { - url = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + url = { + GLOBAL = "https://github.com/ArthurSonzogni/FTXUI/archive/refs/tags/v6.1.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/ftxui/releases/download/6.1.9/ftxui-6.1.9.tar.gz", + }, sha256 = "45819c1e54914783d4a1ca5633885035d74146778a1f74e1213cdb7b76340e71", }, }, diff --git a/pkgs/c/compat.glfw.lua b/pkgs/c/compat.glfw.lua index ced8119..a744bfd 100644 --- a/pkgs/c/compat.glfw.lua +++ b/pkgs/c/compat.glfw.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["3.4"] = { - url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + url = { + GLOBAL = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/glfw/releases/download/3.4/glfw-3.4.tar.gz", + }, sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01", }, }, macosx = { ["3.4"] = { - url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + url = { + GLOBAL = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/glfw/releases/download/3.4/glfw-3.4.tar.gz", + }, sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01", }, }, windows = { ["3.4"] = { - url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + url = { + GLOBAL = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/glfw/releases/download/3.4/glfw-3.4.tar.gz", + }, sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01", }, }, diff --git a/pkgs/c/compat.glx-runtime.lua b/pkgs/c/compat.glx-runtime.lua index 521960b..1219f7a 100644 --- a/pkgs/c/compat.glx-runtime.lua +++ b/pkgs/c/compat.glx-runtime.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["2026.06.03"] = { - url = "https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/a30033d3e812c9bf10094f1010374a6b15e192eb/README.adoc", + url = { + GLOBAL = "https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/a30033d3e812c9bf10094f1010374a6b15e192eb/README.adoc", + CN = "https://gitcode.com/mcpp-res/glx-runtime/releases/download/2026.06.03/glx-runtime-2026.06.03.adoc", + }, sha256 = "ea68efce197e68413ebb62c51ab4bccfb2309a2fca776d31b49d972f59f3640e", }, }, diff --git a/pkgs/c/compat.gtest.lua b/pkgs/c/compat.gtest.lua index 19cf48c..40631d2 100644 --- a/pkgs/c/compat.gtest.lua +++ b/pkgs/c/compat.gtest.lua @@ -15,19 +15,28 @@ package = { xpm = { linux = { ["1.15.2"] = { - url = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + url = { + GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz", + }, sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926", }, }, macosx = { ["1.15.2"] = { - url = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + url = { + GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz", + }, sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926", }, }, windows = { ["1.15.2"] = { - url = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + url = { + GLOBAL = "https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/gtest/releases/download/1.15.2/gtest-1.15.2.tar.gz", + }, sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926", }, }, diff --git a/pkgs/c/compat.imgui.lua b/pkgs/c/compat.imgui.lua index 5fb10a9..63aa3f5 100644 --- a/pkgs/c/compat.imgui.lua +++ b/pkgs/c/compat.imgui.lua @@ -10,31 +10,49 @@ package = { xpm = { linux = { ["1.92.8"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-1.92.8.tar.gz", + }, sha256 = "fecb33d33930e12ff53a34064e9d3a06c8f7c3e04408f14cd36c80e3faac863b", }, ["1.92.8-docking"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8-docking/imgui-1.92.8-docking.tar.gz", + }, sha256 = "ca0653454ed371b7a87e9b0bc29a5d15c9be7f7c0fbe778042fc48c71df1d3d8", }, }, macosx = { ["1.92.8"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-1.92.8.tar.gz", + }, sha256 = "fecb33d33930e12ff53a34064e9d3a06c8f7c3e04408f14cd36c80e3faac863b", }, ["1.92.8-docking"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8-docking/imgui-1.92.8-docking.tar.gz", + }, sha256 = "ca0653454ed371b7a87e9b0bc29a5d15c9be7f7c0fbe778042fc48c71df1d3d8", }, }, windows = { ["1.92.8"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-1.92.8.tar.gz", + }, sha256 = "fecb33d33930e12ff53a34064e9d3a06c8f7c3e04408f14cd36c80e3faac863b", }, ["1.92.8-docking"] = { - url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + url = { + GLOBAL = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.8-docking.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8-docking/imgui-1.92.8-docking.tar.gz", + }, sha256 = "ca0653454ed371b7a87e9b0bc29a5d15c9be7f7c0fbe778042fc48c71df1d3d8", }, }, diff --git a/pkgs/c/compat.khrplatform.lua b/pkgs/c/compat.khrplatform.lua index 3a5118f..214ae77 100644 --- a/pkgs/c/compat.khrplatform.lua +++ b/pkgs/c/compat.khrplatform.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + CN = "https://gitcode.com/mcpp-res/khrplatform/releases/download/2026.05.31/khrplatform-2026.05.31.tar.gz", + }, sha256 = "f303c6a9248081e73c20a41fe9cc5b97c428bc0716286c5bb33551e65306015e", }, }, macosx = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + CN = "https://gitcode.com/mcpp-res/khrplatform/releases/download/2026.05.31/khrplatform-2026.05.31.tar.gz", + }, sha256 = "f303c6a9248081e73c20a41fe9cc5b97c428bc0716286c5bb33551e65306015e", }, }, windows = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/EGL-Registry/archive/3d7796b3721d93976b6bfe536aa97bbc4bce8667.tar.gz", + CN = "https://gitcode.com/mcpp-res/khrplatform/releases/download/2026.05.31/khrplatform-2026.05.31.tar.gz", + }, sha256 = "f303c6a9248081e73c20a41fe9cc5b97c428bc0716286c5bb33551e65306015e", }, }, diff --git a/pkgs/c/compat.libarchive.lua b/pkgs/c/compat.libarchive.lua index de75213..bea9dd1 100644 --- a/pkgs/c/compat.libarchive.lua +++ b/pkgs/c/compat.libarchive.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["3.8.7"] = { - url = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", + url = { + GLOBAL = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/libarchive/releases/download/3.8.7/libarchive-3.8.7.tar.gz", + }, sha256 = "4b787cca6697a95c7725e45293c973c208cbdc71ae2279f30ef09f52472b9166", }, }, macosx = { ["3.8.7"] = { - url = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", + url = { + GLOBAL = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/libarchive/releases/download/3.8.7/libarchive-3.8.7.tar.gz", + }, sha256 = "4b787cca6697a95c7725e45293c973c208cbdc71ae2279f30ef09f52472b9166", }, }, windows = { ["3.8.7"] = { - url = "https://github.com/libarchive/libarchive/archive/refs/tags/v3.8.7.zip", + url = { + GLOBAL = "https://github.com/libarchive/libarchive/archive/refs/tags/v3.8.7.zip", + CN = "https://gitcode.com/mcpp-res/libarchive/releases/download/3.8.7/libarchive-3.8.7.zip", + }, sha256 = "8e16ac8797510144ab71ead4181ea1efb28e036b9fed283e57490ea39b8180d2", }, }, diff --git a/pkgs/c/compat.lua.lua b/pkgs/c/compat.lua.lua index 75ceb0f..32c9770 100644 --- a/pkgs/c/compat.lua.lua +++ b/pkgs/c/compat.lua.lua @@ -21,19 +21,28 @@ package = { xpm = { linux = { ["5.4.7"] = { - url = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + url = { + GLOBAL = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + }, sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30", }, }, macosx = { ["5.4.7"] = { - url = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + url = { + GLOBAL = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + }, sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30", }, }, windows = { ["5.4.7"] = { - url = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + url = { + GLOBAL = "https://github.com/xlings-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/lua/releases/download/5.4.7/lua-5.4.7.tar.gz", + }, sha256 = "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30", }, }, diff --git a/pkgs/c/compat.lz4.lua b/pkgs/c/compat.lz4.lua index 007cd41..74b8732 100644 --- a/pkgs/c/compat.lz4.lua +++ b/pkgs/c/compat.lz4.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + url = { + GLOBAL = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/lz4/releases/download/1.10.0/lz4-1.10.0.tar.gz", + }, sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", }, }, macosx = { ["1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + url = { + GLOBAL = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/lz4/releases/download/1.10.0/lz4-1.10.0.tar.gz", + }, sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", }, }, windows = { ["1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + url = { + GLOBAL = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/lz4/releases/download/1.10.0/lz4-1.10.0.tar.gz", + }, sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", }, }, diff --git a/pkgs/c/compat.mbedtls.lua b/pkgs/c/compat.mbedtls.lua index 2613d61..1dc9dc8 100644 --- a/pkgs/c/compat.mbedtls.lua +++ b/pkgs/c/compat.mbedtls.lua @@ -18,19 +18,28 @@ package = { xpm = { linux = { ["3.6.1"] = { - url = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + url = { + GLOBAL = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mbedtls/releases/download/3.6.1/mbedtls-3.6.1.tar.gz", + }, sha256 = "db75d2f7f35e29cf09f7bd6734d8ee3325f29c298ef071350c5e70a40dd4f0f9", }, }, macosx = { ["3.6.1"] = { - url = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + url = { + GLOBAL = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mbedtls/releases/download/3.6.1/mbedtls-3.6.1.tar.gz", + }, sha256 = "db75d2f7f35e29cf09f7bd6734d8ee3325f29c298ef071350c5e70a40dd4f0f9", }, }, windows = { ["3.6.1"] = { - url = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + url = { + GLOBAL = "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-3.6.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/mbedtls/releases/download/3.6.1/mbedtls-3.6.1.tar.gz", + }, sha256 = "db75d2f7f35e29cf09f7bd6734d8ee3325f29c298ef071350c5e70a40dd4f0f9", }, }, diff --git a/pkgs/c/compat.opengl.lua b/pkgs/c/compat.opengl.lua index 64d68da..d2e806b 100644 --- a/pkgs/c/compat.opengl.lua +++ b/pkgs/c/compat.opengl.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + CN = "https://gitcode.com/mcpp-res/opengl/releases/download/2026.05.31/opengl-2026.05.31.tar.gz", + }, sha256 = "3dadc4ccfe4b8d3a798fb405b7067304420ff997505b67041f3edfeecc3228ae", }, }, macosx = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + CN = "https://gitcode.com/mcpp-res/opengl/releases/download/2026.05.31/opengl-2026.05.31.tar.gz", + }, sha256 = "3dadc4ccfe4b8d3a798fb405b7067304420ff997505b67041f3edfeecc3228ae", }, }, windows = { ["2026.05.31"] = { - url = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + url = { + GLOBAL = "https://github.com/KhronosGroup/OpenGL-Registry/archive/a30033d3e812c9bf10094f1010374a6b15e192eb.tar.gz", + CN = "https://gitcode.com/mcpp-res/opengl/releases/download/2026.05.31/opengl-2026.05.31.tar.gz", + }, sha256 = "3dadc4ccfe4b8d3a798fb405b7067304420ff997505b67041f3edfeecc3228ae", }, }, diff --git a/pkgs/c/compat.x11.lua b/pkgs/c/compat.x11.lua index 1469acf..6da6912 100644 --- a/pkgs/c/compat.x11.lua +++ b/pkgs/c/compat.x11.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.8.13"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libX11-1.8.13.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libX11-1.8.13.tar.gz", + CN = "https://gitcode.com/mcpp-res/x11/releases/download/1.8.13/x11-1.8.13.tar.gz", + }, sha256 = "acf0e7cd7541110e6330ecb539441a2d53061f386ec7be6906dfde0de2598470", }, }, diff --git a/pkgs/c/compat.xau.lua b/pkgs/c/compat.xau.lua index 2ccde32..b6bcb76 100644 --- a/pkgs/c/compat.xau.lua +++ b/pkgs/c/compat.xau.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.0.12"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.12.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.12.tar.gz", + CN = "https://gitcode.com/mcpp-res/xau/releases/download/1.0.12/xau-1.0.12.tar.gz", + }, sha256 = "2402dd938da4d0a332349ab3d3586606175e19cb32cb9fe013c19f1dc922dcee", }, }, diff --git a/pkgs/c/compat.xcb-proto.lua b/pkgs/c/compat.xcb-proto.lua index e9d8a7f..64e1fd7 100644 --- a/pkgs/c/compat.xcb-proto.lua +++ b/pkgs/c/compat.xcb-proto.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.17.0"] = { - url = "https://xorg.freedesktop.org/releases/individual/proto/xcb-proto-1.17.0.tar.xz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/proto/xcb-proto-1.17.0.tar.xz", + CN = "https://gitcode.com/mcpp-res/xcb-proto/releases/download/1.17.0/xcb-proto-1.17.0.tar.xz", + }, sha256 = "2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c", }, }, diff --git a/pkgs/c/compat.xcb.lua b/pkgs/c/compat.xcb.lua index e74302d..60e3d46 100644 --- a/pkgs/c/compat.xcb.lua +++ b/pkgs/c/compat.xcb.lua @@ -13,7 +13,10 @@ package = { "xim:python@latest", }, ["1.17.0"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libxcb-1.17.0.tar.xz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libxcb-1.17.0.tar.xz", + CN = "https://gitcode.com/mcpp-res/xcb/releases/download/1.17.0/xcb-1.17.0.tar.xz", + }, sha256 = "599ebf9996710fea71622e6e184f3a8ad5b43d0e5fa8c4e407123c88a59a6d55", }, }, diff --git a/pkgs/c/compat.xcursor.lua b/pkgs/c/compat.xcursor.lua index aa6b495..de7daa1 100644 --- a/pkgs/c/compat.xcursor.lua +++ b/pkgs/c/compat.xcursor.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.2.3"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXcursor-1.2.3.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXcursor-1.2.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/xcursor/releases/download/1.2.3/xcursor-1.2.3.tar.gz", + }, sha256 = "74e72da27e61cc2cfd2e267c14f500ea47775850048ee0b00362a55c9b60ee9b", }, }, diff --git a/pkgs/c/compat.xdmcp.lua b/pkgs/c/compat.xdmcp.lua index be6c488..3364efe 100644 --- a/pkgs/c/compat.xdmcp.lua +++ b/pkgs/c/compat.xdmcp.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.1.5"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.5.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/xdmcp/releases/download/1.1.5/xdmcp-1.1.5.tar.gz", + }, sha256 = "31a7abc4f129dcf6f27ae912c3eedcb94d25ad2e8f317f69df6eda0bc4e4f2f3", }, }, diff --git a/pkgs/c/compat.xext.lua b/pkgs/c/compat.xext.lua index 784a79e..8d648b2 100644 --- a/pkgs/c/compat.xext.lua +++ b/pkgs/c/compat.xext.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.3.7"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXext-1.3.7.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXext-1.3.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/xext/releases/download/1.3.7/xext-1.3.7.tar.gz", + }, sha256 = "6564608dc3b816b0cfddf0c7ddc62bc579055dd70b2f28113a618df2acb64189", }, }, diff --git a/pkgs/c/compat.xfixes.lua b/pkgs/c/compat.xfixes.lua index d8b66eb..98c5f79 100644 --- a/pkgs/c/compat.xfixes.lua +++ b/pkgs/c/compat.xfixes.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["6.0.2"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXfixes-6.0.2.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXfixes-6.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/xfixes/releases/download/6.0.2/xfixes-6.0.2.tar.gz", + }, sha256 = "041331b8e6e36038b3bf836785b6b175ec8515f964c9e4e3316b3bfed0f53ac7", }, }, diff --git a/pkgs/c/compat.xi.lua b/pkgs/c/compat.xi.lua index 7c6078d..56698f3 100644 --- a/pkgs/c/compat.xi.lua +++ b/pkgs/c/compat.xi.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.8.3"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXi-1.8.3.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXi-1.8.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/xi/releases/download/1.8.3/xi-1.8.3.tar.gz", + }, sha256 = "6648c44127e4585f4e7842c0802d265008fa6f9741df0ea6ee7934a5267adf63", }, }, diff --git a/pkgs/c/compat.xinerama.lua b/pkgs/c/compat.xinerama.lua index d563771..04b0110 100644 --- a/pkgs/c/compat.xinerama.lua +++ b/pkgs/c/compat.xinerama.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.1.6"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXinerama-1.1.6.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXinerama-1.1.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/xinerama/releases/download/1.1.6/xinerama-1.1.6.tar.gz", + }, sha256 = "c74ee3d05e473671bf86285e2dece345485200bb042bea1540b1e30ff3f74bae", }, }, diff --git a/pkgs/c/compat.xorgproto.lua b/pkgs/c/compat.xorgproto.lua index 56f4a02..7070e5d 100644 --- a/pkgs/c/compat.xorgproto.lua +++ b/pkgs/c/compat.xorgproto.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["2025.1"] = { - url = "https://xorg.freedesktop.org/releases/individual/proto/xorgproto-2025.1.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/proto/xorgproto-2025.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/xorgproto/releases/download/2025.1/xorgproto-2025.1.tar.gz", + }, sha256 = "d6f89f65bafb8c9b735e0515882b8a1511e8e864dde5e9513e191629369f2256", }, }, diff --git a/pkgs/c/compat.xrandr.lua b/pkgs/c/compat.xrandr.lua index 124b45a..47d9693 100644 --- a/pkgs/c/compat.xrandr.lua +++ b/pkgs/c/compat.xrandr.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.5.5"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.5.5.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.5.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/xrandr/releases/download/1.5.5/xrandr-1.5.5.tar.gz", + }, sha256 = "23faedab4675890ba579b8103399132a139527306b18b500c6fe28e090e2a056", }, }, diff --git a/pkgs/c/compat.xrender.lua b/pkgs/c/compat.xrender.lua index 04b512b..2728664 100644 --- a/pkgs/c/compat.xrender.lua +++ b/pkgs/c/compat.xrender.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["0.9.12"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/libXrender-0.9.12.tar.gz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/libXrender-0.9.12.tar.gz", + CN = "https://gitcode.com/mcpp-res/xrender/releases/download/0.9.12/xrender-0.9.12.tar.gz", + }, sha256 = "0fff64125819c02d1102b6236f3d7d861a07b5216d8eea336c3811d31494ecf7", }, }, diff --git a/pkgs/c/compat.xtrans.lua b/pkgs/c/compat.xtrans.lua index 1c1b56d..1a49e19 100644 --- a/pkgs/c/compat.xtrans.lua +++ b/pkgs/c/compat.xtrans.lua @@ -10,7 +10,10 @@ package = { xpm = { linux = { ["1.6.0"] = { - url = "https://xorg.freedesktop.org/releases/individual/lib/xtrans-1.6.0.tar.xz", + url = { + GLOBAL = "https://xorg.freedesktop.org/releases/individual/lib/xtrans-1.6.0.tar.xz", + CN = "https://gitcode.com/mcpp-res/xtrans/releases/download/1.6.0/xtrans-1.6.0.tar.xz", + }, sha256 = "faafea166bf2451a173d9d593352940ec6404145c5d1da5c213423ce4d359e92", }, }, diff --git a/pkgs/c/compat.xz.lua b/pkgs/c/compat.xz.lua index 8e2ace7..ecf0317 100644 --- a/pkgs/c/compat.xz.lua +++ b/pkgs/c/compat.xz.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + url = { + GLOBAL = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/xz/releases/download/5.8.3/xz-5.8.3.tar.gz", + }, sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", }, }, macosx = { ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + url = { + GLOBAL = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/xz/releases/download/5.8.3/xz-5.8.3.tar.gz", + }, sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", }, }, windows = { ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + url = { + GLOBAL = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/xz/releases/download/5.8.3/xz-5.8.3.tar.gz", + }, sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", }, }, diff --git a/pkgs/c/compat.zlib.lua b/pkgs/c/compat.zlib.lua index 87eda33..36cc834 100644 --- a/pkgs/c/compat.zlib.lua +++ b/pkgs/c/compat.zlib.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + url = { + GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz", + }, sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", }, }, macosx = { ["1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + url = { + GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz", + }, sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", }, }, windows = { ["1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + url = { + GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz", + }, sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", }, }, diff --git a/pkgs/c/compat.zstd.lua b/pkgs/c/compat.zstd.lua index b99ff6d..d75014c 100644 --- a/pkgs/c/compat.zstd.lua +++ b/pkgs/c/compat.zstd.lua @@ -10,19 +10,28 @@ package = { xpm = { linux = { ["1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + url = { + GLOBAL = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/zstd/releases/download/1.5.7/zstd-1.5.7.tar.gz", + }, sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", }, }, macosx = { ["1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + url = { + GLOBAL = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/zstd/releases/download/1.5.7/zstd-1.5.7.tar.gz", + }, sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", }, }, windows = { ["1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + url = { + GLOBAL = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", + CN = "https://gitcode.com/mcpp-res/zstd/releases/download/1.5.7/zstd-1.5.7.tar.gz", + }, sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", }, }, diff --git a/pkgs/i/imgui.lua b/pkgs/i/imgui.lua index b0322d1..dd1795d 100644 --- a/pkgs/i/imgui.lua +++ b/pkgs/i/imgui.lua @@ -14,79 +14,133 @@ package = { xpm = { linux = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.1/imgui-0.0.1.tar.gz", + }, sha256 = "168d1f9a2dfc3823d671385654823f7eba25f146d029ceeacfb19a84617af4a0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.2/imgui-0.0.2.tar.gz", + }, sha256 = "dd2199c76ea762fc2eb084967fa42953c8b876e076e41b57409f84b322e3161e", }, ["0.0.3"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.3/imgui-0.0.3.tar.gz", + }, sha256 = "55bc5c557f5c803279f923e0335a788a6d6f57289b3c2e1a0dd0cc46414b3524", }, ["0.0.4"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.4/imgui-0.0.4.tar.gz", + }, sha256 = "d10f7794225de45167e0ff88cb37532ae8a4f00d145fcdaa58fe19702467bc44", }, ["0.0.5"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.5/imgui-0.0.5.tar.gz", + }, sha256 = "6b729104166b8dd0db5c6d5018ffcd24c0df6a9fc0e4381f1f8151c22724bed6", }, ["0.0.6"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.6/imgui-0.0.6.tar.gz", + }, sha256 = "25780adb69fb5080b2dbd9a26ff007fc0751301544e0e6fb467d674091bbf071", }, }, macosx = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.1/imgui-0.0.1.tar.gz", + }, sha256 = "168d1f9a2dfc3823d671385654823f7eba25f146d029ceeacfb19a84617af4a0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.2/imgui-0.0.2.tar.gz", + }, sha256 = "dd2199c76ea762fc2eb084967fa42953c8b876e076e41b57409f84b322e3161e", }, ["0.0.3"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.3/imgui-0.0.3.tar.gz", + }, sha256 = "55bc5c557f5c803279f923e0335a788a6d6f57289b3c2e1a0dd0cc46414b3524", }, ["0.0.4"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.4/imgui-0.0.4.tar.gz", + }, sha256 = "d10f7794225de45167e0ff88cb37532ae8a4f00d145fcdaa58fe19702467bc44", }, ["0.0.5"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.5/imgui-0.0.5.tar.gz", + }, sha256 = "6b729104166b8dd0db5c6d5018ffcd24c0df6a9fc0e4381f1f8151c22724bed6", }, ["0.0.6"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.6/imgui-0.0.6.tar.gz", + }, sha256 = "25780adb69fb5080b2dbd9a26ff007fc0751301544e0e6fb467d674091bbf071", }, }, windows = { ["0.0.1"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.1/imgui-0.0.1.tar.gz", + }, sha256 = "168d1f9a2dfc3823d671385654823f7eba25f146d029ceeacfb19a84617af4a0", }, ["0.0.2"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.2/imgui-0.0.2.tar.gz", + }, sha256 = "dd2199c76ea762fc2eb084967fa42953c8b876e076e41b57409f84b322e3161e", }, ["0.0.3"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.3/imgui-0.0.3.tar.gz", + }, sha256 = "55bc5c557f5c803279f923e0335a788a6d6f57289b3c2e1a0dd0cc46414b3524", }, ["0.0.4"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.4/imgui-0.0.4.tar.gz", + }, sha256 = "d10f7794225de45167e0ff88cb37532ae8a4f00d145fcdaa58fe19702467bc44", }, ["0.0.5"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.5/imgui-0.0.5.tar.gz", + }, sha256 = "6b729104166b8dd0db5c6d5018ffcd24c0df6a9fc0e4381f1f8151c22724bed6", }, ["0.0.6"] = { - url = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/0.0.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/0.0.6/imgui-0.0.6.tar.gz", + }, sha256 = "25780adb69fb5080b2dbd9a26ff007fc0751301544e0e6fb467d674091bbf071", }, }, diff --git a/pkgs/l/llmapi.lua b/pkgs/l/llmapi.lua index cb93360..9569b7d 100644 --- a/pkgs/l/llmapi.lua +++ b/pkgs/l/llmapi.lua @@ -13,43 +13,70 @@ package = { xpm = { linux = { ["0.2.4"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.4/llmapi-0.2.4.tar.gz", + }, sha256 = "b1d204576ee2d2069abdac1a7e25078e605c8fae5b1cdad6cee200946cfed0f0", }, ["0.2.5"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.5/llmapi-0.2.5.tar.gz", + }, sha256 = "fffa1341beed98ace97e029c0e46f47f55470df6e6a7114374e73e2bfd13699f", }, ["0.2.6"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.6/llmapi-0.2.6.tar.gz", + }, sha256 = "d4aedb04d695c6bbf5685fad79185642aec4a48e8b4211275b752294c3eb43cc", }, }, macosx = { ["0.2.4"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.4/llmapi-0.2.4.tar.gz", + }, sha256 = "b1d204576ee2d2069abdac1a7e25078e605c8fae5b1cdad6cee200946cfed0f0", }, ["0.2.5"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.5/llmapi-0.2.5.tar.gz", + }, sha256 = "fffa1341beed98ace97e029c0e46f47f55470df6e6a7114374e73e2bfd13699f", }, ["0.2.6"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.6/llmapi-0.2.6.tar.gz", + }, sha256 = "d4aedb04d695c6bbf5685fad79185642aec4a48e8b4211275b752294c3eb43cc", }, }, windows = { ["0.2.4"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.4.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.4/llmapi-0.2.4.tar.gz", + }, sha256 = "b1d204576ee2d2069abdac1a7e25078e605c8fae5b1cdad6cee200946cfed0f0", }, ["0.2.5"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.5.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.5/llmapi-0.2.5.tar.gz", + }, sha256 = "fffa1341beed98ace97e029c0e46f47f55470df6e6a7114374e73e2bfd13699f", }, ["0.2.6"] = { - url = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/llmapi/archive/refs/tags/0.2.6.tar.gz", + CN = "https://gitcode.com/mcpp-res/llmapi/releases/download/0.2.6/llmapi-0.2.6.tar.gz", + }, sha256 = "d4aedb04d695c6bbf5685fad79185642aec4a48e8b4211275b752294c3eb43cc", }, }, diff --git a/pkgs/m/mcpplibs.capi.lua.lua b/pkgs/m/mcpplibs.capi.lua.lua index 54ceecb..ad22940 100644 --- a/pkgs/m/mcpplibs.capi.lua.lua +++ b/pkgs/m/mcpplibs.capi.lua.lua @@ -13,19 +13,28 @@ package = { xpm = { linux = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, macosx = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, windows = { ["0.0.3"] = { - url = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/lua/archive/refs/tags/0.0.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/capi.lua/releases/download/0.0.3/capi.lua-0.0.3.tar.gz", + }, sha256 = "f7f46c3cd193dc4527be5f3e5cfc29d7e322d5d3db56b9bdb060f289090088d6", }, }, diff --git a/pkgs/t/templates.lua b/pkgs/t/templates.lua index f7d583c..88bcf22 100644 --- a/pkgs/t/templates.lua +++ b/pkgs/t/templates.lua @@ -15,19 +15,28 @@ package = { xpm = { linux = { ["0.0.1"] = { - url = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/templates/releases/download/0.0.1/templates-0.0.1.tar.gz", + }, sha256 = "348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3", }, }, macosx = { ["0.0.1"] = { - url = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/templates/releases/download/0.0.1/templates-0.0.1.tar.gz", + }, sha256 = "348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3", }, }, windows = { ["0.0.1"] = { - url = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/templates/releases/download/0.0.1/templates-0.0.1.tar.gz", + }, sha256 = "348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3", }, }, diff --git a/pkgs/t/tinyhttps.lua b/pkgs/t/tinyhttps.lua index ef25e2f..45447f9 100644 --- a/pkgs/t/tinyhttps.lua +++ b/pkgs/t/tinyhttps.lua @@ -13,43 +13,70 @@ package = { xpm = { linux = { ["0.2.1"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.1/tinyhttps-0.2.1.tar.gz", + }, sha256 = "88adc68b1c1ec635c409604547fdfe8486aa1b376bad28c74858ed1f3ce5391c", }, ["0.2.2"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.2/tinyhttps-0.2.2.tar.gz", + }, sha256 = "bc4cb59475826a975dd0408b59a00cf41c4aa4078a0fc2e54929bde7fb696248", }, ["0.2.3"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.3/tinyhttps-0.2.3.tar.gz", + }, sha256 = "67ff75050d31157d3c35562187c9fb622e66167c98bb950cebb51db9b07ebe97", }, }, macosx = { ["0.2.1"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.1/tinyhttps-0.2.1.tar.gz", + }, sha256 = "88adc68b1c1ec635c409604547fdfe8486aa1b376bad28c74858ed1f3ce5391c", }, ["0.2.2"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.2/tinyhttps-0.2.2.tar.gz", + }, sha256 = "bc4cb59475826a975dd0408b59a00cf41c4aa4078a0fc2e54929bde7fb696248", }, ["0.2.3"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.3/tinyhttps-0.2.3.tar.gz", + }, sha256 = "67ff75050d31157d3c35562187c9fb622e66167c98bb950cebb51db9b07ebe97", }, }, windows = { ["0.2.1"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.1.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.1/tinyhttps-0.2.1.tar.gz", + }, sha256 = "88adc68b1c1ec635c409604547fdfe8486aa1b376bad28c74858ed1f3ce5391c", }, ["0.2.2"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.2/tinyhttps-0.2.2.tar.gz", + }, sha256 = "bc4cb59475826a975dd0408b59a00cf41c4aa4078a0fc2e54929bde7fb696248", }, ["0.2.3"] = { - url = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + url = { + GLOBAL = "https://github.com/mcpplibs/tinyhttps/archive/refs/tags/0.2.3.tar.gz", + CN = "https://gitcode.com/mcpp-res/tinyhttps/releases/download/0.2.3/tinyhttps-0.2.3.tar.gz", + }, sha256 = "67ff75050d31157d3c35562187c9fb622e66167c98bb950cebb51db9b07ebe97", }, }, diff --git a/pkgs/x/xpkg.lua b/pkgs/x/xpkg.lua index b6336b3..288dd44 100644 --- a/pkgs/x/xpkg.lua +++ b/pkgs/x/xpkg.lua @@ -13,43 +13,70 @@ package = { xpm = { linux = { ["0.0.41"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.41/xpkg-0.0.41.tar.gz", + }, sha256 = "d4a0dc6df0388858415cf6899dd1aa6d5d8b9836f1f81c9687b0b34fb7ee0e2e", }, ["0.0.40"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.40/xpkg-0.0.40.tar.gz", + }, sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f", }, ["0.0.39"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.39/xpkg-0.0.39.tar.gz", + }, sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71", }, }, macosx = { ["0.0.41"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.41/xpkg-0.0.41.tar.gz", + }, sha256 = "d4a0dc6df0388858415cf6899dd1aa6d5d8b9836f1f81c9687b0b34fb7ee0e2e", }, ["0.0.40"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.40/xpkg-0.0.40.tar.gz", + }, sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f", }, ["0.0.39"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.39/xpkg-0.0.39.tar.gz", + }, sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71", }, }, windows = { ["0.0.41"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.41.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.41/xpkg-0.0.41.tar.gz", + }, sha256 = "d4a0dc6df0388858415cf6899dd1aa6d5d8b9836f1f81c9687b0b34fb7ee0e2e", }, ["0.0.40"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.40/xpkg-0.0.40.tar.gz", + }, sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f", }, ["0.0.39"] = { - url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + url = { + GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz", + CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.39/xpkg-0.0.39.tar.gz", + }, sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71", }, }, diff --git a/tests/check_mirror_urls.lua b/tests/check_mirror_urls.lua new file mode 100644 index 0000000..e7cf61f --- /dev/null +++ b/tests/check_mirror_urls.lua @@ -0,0 +1,63 @@ +-- Lint the GLOBAL/CN mirror tables in a package descriptor. +-- +-- Rules (only applied to `url` fields written in table form — plain-string +-- urls remain valid and are left to the author): +-- * a url table must define BOTH `GLOBAL` and `CN` +-- * both values must be non-empty strings +-- * `CN` must be a gitcode.com/mcpp-res//releases/download/... URL +-- * `GLOBAL` must not itself point at the mcpp-res CN mirror +-- +-- Usage: lua5.4 tests/check_mirror_urls.lua +-- Exit non-zero (and print ::error lines) on the first violation in the file. + +function import(...) + return setmetatable({}, {__index = function() return function() end end}) +end + +local path = assert(arg[1], "usage: check_mirror_urls.lua ") +package = nil +local chunk = assert(loadfile(path, "t")) +chunk() + +local p = package +if type(p) ~= "table" then os.exit(0) end + +local fail = 0 +local function err(msg) + io.stderr:write(string.format("::error file=%s::%s\n", path, msg)) + fail = 1 +end + +local function check_url(ctx, u) + if type(u) == "string" then return end -- plain url: fine + if type(u) ~= "table" then + err(ctx .. ": url must be a string or { GLOBAL=..., CN=... } table") + return + end + local g, c = u.GLOBAL, u.CN + if type(g) ~= "string" or g == "" then + err(ctx .. ": url table missing non-empty GLOBAL") + end + if type(c) ~= "string" or c == "" then + err(ctx .. ": url table missing non-empty CN") + end + if type(c) == "string" and not c:match("^https://gitcode%.com/mcpp%-res/") then + err(ctx .. ": CN url must be under https://gitcode.com/mcpp-res/ (got " .. tostring(c) .. ")") + end + if type(g) == "string" and g:match("^https://gitcode%.com/mcpp%-res/") then + err(ctx .. ": GLOBAL url must not point at the CN mirror") + end +end + +local xpm = p.xpm or {} +for plat, vt in pairs(xpm) do + if type(vt) == "table" then + for ver, entry in pairs(vt) do + if type(entry) == "table" and entry.url ~= nil then + check_url(string.format("%s/%s/%s", p.name or "?", tostring(plat), tostring(ver)), entry.url) + end + end + end +end + +os.exit(fail) diff --git a/tests/list_cn_urls.lua b/tests/list_cn_urls.lua new file mode 100644 index 0000000..666c6d1 --- /dev/null +++ b/tests/list_cn_urls.lua @@ -0,0 +1,33 @@ +-- Print every CN mirror URL found in a package descriptor, one per line, +-- as "\t". Used by CI to check that each mirrored +-- asset is actually reachable on gitcode. Plain-string urls are ignored. +-- +-- Usage: lua5.4 tests/list_cn_urls.lua + +function import(...) + return setmetatable({}, {__index = function() return function() end end}) +end + +local path = assert(arg[1], "usage: list_cn_urls.lua ") +package = nil +local chunk = assert(loadfile(path, "t")) +chunk() + +local p = package +if type(p) ~= "table" then os.exit(0) end + +local seen = {} +local xpm = p.xpm or {} +for _, vt in pairs(xpm) do + if type(vt) == "table" then + for _, entry in pairs(vt) do + if type(entry) == "table" and type(entry.url) == "table" then + local cn = entry.url.CN + if type(cn) == "string" and cn ~= "" and not seen[cn] then + seen[cn] = true + print(cn .. "\t" .. (entry.sha256 or "")) + end + end + end + end +end