No description
Find a file
Max Howell cc6e9e1142
unicode * is toxic (#4049)
* unicode * is toxic

* try proper clang settings

---------

Co-authored-by: Jacob Heider <jacob@pkgx.dev>
2023-11-15 15:04:53 -05:00
.devcontainer fix: update codespaces configuration (#3550) 2023-10-06 19:31:46 -04:00
.github fix bottling gnupg 2023-11-11 22:30:31 -05:00
.vscode git foo will automatically install and run git-foo (#3537) 2023-10-05 13:52:36 -04:00
projects unicode * is toxic (#4049) 2023-11-15 15:04:53 -05:00
.gitignore unicode * is toxic (#4049) 2023-11-15 15:04:53 -05:00
pkgx.yaml fix cargo on Sonoma (hopefully) (#3544) 2023-10-06 08:21:54 -04:00
README.md fix sd-webui 1.6 2023-10-24 10:21:42 -04:00

pkgx

pkg metadata and build instructions.

Contributing

Assuming you have pkgx with shell integration:

$ git clone https://github.com/pkgxdev/pantry

$ cd pantry

$ dev  # https://docs.pkgx.sh/dev
# ^^ IMPORTANT! Otherwise the `pkg` command cannot be found

$ pkg init
# ^^ creates a “wip” package.yml
# ^^ if you already know the name, you can pass it as an argument

$ pkg edit
# ^^ opens the new package.yml in your EDITOR

$ pkg build
# builds to `./builds`
# ^^ needs a zero permissions GITHUB_TOKEN to use the GitHub API
# either set `GITHUB_TOKEN` or run `gh auth login`

$ pkgx yq .provides <projects/$(pkg status | tr -d '[:space:]')/package.yml
- bin/foo
# ^^ purely demonstrative for the next step

$ pkgx foo
# ^^ anything in the `provides:` key will now run

$ pkg test
# ^^ you need to write a test that verifies the package works

$ gh repo fork
$ git branch -m my-new-package
$ git push origin my-new-package
$ gh pr create
  • pkg build and pkg test take a -L flag to run in a Linux Docker container
  • All commands take an optional pkg-spec eg. pkg build node@19

While inside the pantry dev environment you can run commands from any built packages provided you specified their provides: key in the package.yml.

We use a special package called brewkit to build packages both here and in CI/CD. brewkit provides the pkg command.

GitHub Codespaces

pantry also works in GitHub Codespaces. The default configuration provided with the repository will install/update pkgx at the time you attach, so you should be able to quickly work on test packages in a remote linux environment (or work from a device with just a web browser).

Packaging Guide

Packaging can be cumbersome. Our wiki is our packaging knowledge base. For other assistance, start a discussion.

The best way to figure out solutions for your problems is to read other examples from the pantry.

After Your Contribution

We build “bottles” (tard binaries) and upload them to our CDN. Thus your contribution will be available at merge-time + build-time + CDN distribution time.

pkgx should automatically sync the pantry to your local machine if you ask for something it doesnt know about, but in the case where that fails do a pkgx --sync first.

The pantry automatically builds new releases of packages as soon as they are released (usually starting the builds within seconds). There is no need to submit PRs for updates.

Note that while in the pantry dev environment you can use your new package if you built it. However this will not work outside the pantry dev unless you either:

  1. You set PKGX_PANTRY_PATH
  2. Get your PR merged!

Working on Other Peoples Pull Requests

Packaging can be fiddly so we all pitch in. If you want to help someone else with their pull request then you can use GitHubs CLI:

$ gh pr checkout 123

# or you can copy paste the URL:
$ gh pr checkout https://github.com/pkgxdev/pantry/pull/123

# then open for editing:
$ pkg edit