Skip to content

Generate a JSON package manifest to enable repology.org indexing #9966

Description

@gistrec

Context

repology.org aggregates package versions across many C/C++ package managers (vcpkg, Conan, Homebrew, distro repos) so library authors and users can see where a library is published and at which versions.

xmake-repo is currently not indexed by repology. A community contributor (@luadebug) has an open PR adding xrepo fetch support: repology/repology-updater#1585. The PR is blocked, not on principle, but on three specific data gaps. The repology maintainer @AMDmi3 made it clear that parsing xmake.lua source directly is a non-starter ("We will not parse source code in any way") but accepts indexing from a structured external source if it exposes the following fields:

  1. homepage must be exposed per package (currently dropped)
  2. Repository URL must be distinguishable from download URL — no heuristics like .git suffix matching
  3. URLs must be concrete — no $(version) interpolation, resolved against the latest version

Proposal

Have xmake-repo CI publish a small packages.json manifest at a stable URL (e.g. a gh-pages branch, or a Release asset). Repology can then ingest directly.

Suggested minimal schema (one entry per package, latest version only — repology doesn't need history):

{
  "generated_at": "2026-05-12T12:00:00Z",
  "packages": [
    {
      "name": "geo-utils-cpp",
      "version": "1.0.1",
      "description": "A tiny header-only C++17 latitude/longitude geometry library",
      "license": "Apache-2.0",
      "homepage": "https://github.com/gistrec/geo-utils-cpp",
      "repository_url": "https://github.com/gistrec/geo-utils-cpp",
      "download_url": "https://github.com/gistrec/geo-utils-cpp/archive/refs/tags/v1.0.1.tar.gz"
    }
  ]
}

Each field maps directly to an xmake.lua call (so generation is just sandboxed evaluation, which xmake already does on install):

Field Source in xmake.lua
name package directory name
version latest add_versions(...) entry
description set_description(...)
license set_license(...)
homepage set_homepage(...)
repository_url first source URL recognised as git/https://github.com/... (known at generation time, no heuristic)
download_url first archive URL from set_urls(...), with $(version) substituted by the latest version

A scripts/build_index.lua could iterate packages/**/xmake.lua and emit the JSON; a CI job runs it on every merge to master and commits to gh-pages (or uploads as a release artifact). Estimated effort: ~50-100 lines of Lua + a small workflow.

Why this is worth it for xmake-repo

  • Library authors gain visibility — repology is the canonical "where is my package available" cross-index for C/C++.
  • Users see at a glance that a library is published on both vcpkg and xmake-repo, which raises xrepo's profile.
  • Unblocks an already-written PR (#1585) — no work needed on repology's side once the manifest exists.
  • The lift is small and self-contained: an internal CI script + one published file.

Happy to help draft the generation script if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions