File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : validate
2+
3+ on :
4+ pull_request :
5+ paths : ["pkgs/**/*.lua"]
6+ push :
7+ branches : [main]
8+
9+ jobs :
10+ lint :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Lint package descriptors
15+ run : |
16+ fail=0
17+ for f in pkgs/*/*.lua; do
18+ if grep -q "^function install" "$f"; then
19+ echo "::error file=$f::install hook is forbidden"
20+ fail=1
21+ fi
22+ if ! grep -q "mcpp = {" "$f"; then
23+ echo "::error file=$f::missing mcpp = {} segment"
24+ fail=1
25+ fi
26+ if ! grep -q 'schema *= *"0\.1"' "$f"; then
27+ echo "::error file=$f::missing schema = \"0.1\""
28+ fail=1
29+ fi
30+ done
31+ [ $fail -eq 0 ] && echo "All package files valid."
32+ exit $fail
Original file line number Diff line number Diff line change 1+ This repository's package descriptors (.lua files) are released under
2+ Creative Commons Zero v1.0 Universal (CC0).
3+
4+ The mcpp tool that consumes them is licensed under Apache-2.0; each indexed
5+ package has its own license declared in its own xpkg descriptor.
Original file line number Diff line number Diff line change 1+ # mcpp-index
2+
3+ > Package index registry for the [ ` mcpp ` ] ( https://github.com/mcpp-community/mcpp ) build tool.
4+
5+ This repository indexes modular C++23 packages that follow the
6+ [ xpkg v1 spec] ( https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md )
7+ plus the [ mcpp extension segment] ( https://github.com/mcpp-community/mcpp/blob/dev/docs/04-schema-xpkg-extension.md ) .
8+
9+ ## How is this different from xim-pkgindex / mcpplibs-index?
10+
11+ | Repo | Format | Build tool | Status |
12+ | ------| --------| ------------| --------|
13+ | [ ` d2learn/xim-pkgindex ` ] ( https://github.com/d2learn/xim-pkgindex ) | xpkg v1 (Lua) | xlings + various | Official xlings index |
14+ | [ ` mcpplibs/mcpplibs-index ` ] ( https://github.com/mcpplibs/mcpplibs-index ) | xmake ` package(...) ` | xmake | mcpplibs xmake-style index |
15+ | ** ` mcpp-community/mcpp-index ` ** (this) | xpkg v1 + mcpp ext | mcpp | Modular-only, mcpp-driven |
16+
17+ ## Layout
18+
19+ ```
20+ pkgs/<letter>/<package>.lua Each indexed package
21+ docs/ Contributor docs
22+ .github/workflows/ CI: lint, validate, deploy
23+ ```
24+
25+ ## Using this index
26+
27+ mcpp registers ` mcpp-index ` automatically as the default registry. With a
28+ fresh ` mcpp ` install:
29+
30+ ``` bash
31+ mcpp env # initializes ~/.mcpp/registry/
32+ mcpp search hello # searches mcpp-index
33+ mcpp add mcpplibs.templates@0.0.1 # adds to your project's mcpp.toml
34+ mcpp build # mcpp pulls source via xlings, builds
35+ ```
36+
37+ ## Adding a package
38+
39+ See [ docs/19-creating-mcpp-index.md] ( https://github.com/mcpp-community/mcpp/blob/dev/docs/19-creating-mcpp-index.md ) in the mcpp repo.
40+
41+ ## License
42+
43+ Package descriptions: CC0 (metadata is uncopyrightable). Each indexed package
44+ has its own license.
Original file line number Diff line number Diff line change 1+ -- AUTO-GENERATED by mcpp emit xpkg-equivalent (manual seed).
2+ -- Source: https://github.com/mcpp-community/templates @ v0.0.1
3+ package = {
4+ spec = " 1" ,
5+ name = " mcpplibs.templates" ,
6+ description = " Minimal C++23 modular hello library" ,
7+ licenses = {" Apache-2.0" },
8+ repo = " https://github.com/mcpp-community/templates" ,
9+ type = " package" ,
10+
11+ xpm = {
12+ linux = {
13+ [" 0.0.1" ] = {
14+ url = " https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz" ,
15+ sha256 = " 348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3" ,
16+ },
17+ },
18+ macosx = {
19+ [" 0.0.1" ] = {
20+ url = " https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz" ,
21+ sha256 = " 348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3" ,
22+ },
23+ },
24+ windows = {
25+ [" 0.0.1" ] = {
26+ url = " https://github.com/mcpp-community/templates/archive/refs/tags/v0.0.1.tar.gz" ,
27+ sha256 = " 348640a5b8fb09c6392e5487234f426f0d1dd6b1ed46e6644cdec3c9d65e7fd3" ,
28+ },
29+ },
30+ },
31+
32+ mcpp = {
33+ schema = " 0.1" ,
34+ language = " c++23" ,
35+ import_std = true ,
36+ modules = { " mcpplibs.templates" },
37+ deps = { },
38+ manifest = " mcpp.toml" ,
39+ },
40+ }
You can’t perform that action at this time.
0 commit comments