Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fliegendewurst/nixpkgs-pr-build-bot
Self-hosted ofborg-like bot for nixpkgs
https://github.com/fliegendewurst/nixpkgs-pr-build-bot
nixpkgs
Last synced: 6 days ago
JSON representation
Self-hosted ofborg-like bot for nixpkgs
- Host: GitHub
- URL: https://github.com/fliegendewurst/nixpkgs-pr-build-bot
- Owner: FliegendeWurst
- License: agpl-3.0
- Created: 2025-01-10T09:41:25.000Z (10 days ago)
- Default Branch: master
- Last Pushed: 2025-01-10T10:23:47.000Z (10 days ago)
- Last Synced: 2025-01-10T11:32:21.012Z (10 days ago)
- Topics: nixpkgs
- Language: Rust
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nixpkgs PR build bot
This bot is essentially a private [ofborg](https://github.com/NixOS/ofborg?tab=readme-ov-file#ofborg) / [nixpkgs-review](https://github.com/Mic92/nixpkgs-review) bot, but much easier to host.
It builds all packages mentioned in the commits of a nixpkgs pull request, or alternatively all packages impacted by the changes.Send me a message if you would like to access a demo instance of the bot.
## Configuration
You can configure the bot by setting certain environment variables.
The bot will process `$TASKS` PRs in parallel, with `$JOBS` jobs each, with each job getting `$CORES` cores.
`$NIXPKGS_DIRECTORY` must be set to a [jj](https://github.com/jj-vcs/jj#readme)-colocated checkout of nixpkgs.
`$SUDO_PASSWORD` is used to switch to the `nobody` user when invoking Nix.
`$WASTEBIN` is the URL to a [wastebin](https://github.com/matze/wastebin) instance.
(Note, the instance must support [setting paste titles](https://github.com/matze/wastebin/pull/91).)
`$CONTACT`, `$DESCRIPTION` are displayed in the bot's introduction message.
`$GH_TOKEN` is only used for fetching evaluation artifacts, use a fine-grained access token with public read-only permissions.`.env` template, with the defaults explicitly set:
```
export TELEGRAM_BOT_TOKEN=
export LANG=
export NIXPKGS_PR_BUILD_BOT_NIXPKGS_DIRECTORY=
export NIXPKGS_PR_BUILD_BOT_SUDO_PASSWORD=
export NIXPKGS_PR_BUILD_BOT_CORES=0
export NIXPKGS_PR_BUILD_BOT_JOBS=6
export NIXPKGS_PR_BUILD_BOT_TASKS=10
export NIXPKGS_PR_BUILD_BOT_WASTEBIN=https://paste.fliegendewurst.eu
export NIXPKGS_PR_BUILD_BOT_CONTACT="this bot's owner"
export NIXPKGS_PR_BUILD_BOT_DESCRIPTION="the nixpkgs revision currently checked out"
export NIXPKGS_PR_BUILD_BOT_GH_TOKEN=
```## Usage
Start a chat with the bot. The bot will reply with a small introduction.
TL;DR: send `/pr ` to build mentioned packages.
Use `/full ` to build all changed packages (equivalent to nixpkgs-review).