{"id":13648585,"url":"https://github.com/NixOS/ofborg","last_synced_at":"2025-04-22T11:32:49.075Z","repository":{"id":37602053,"uuid":"108771239","full_name":"NixOS/ofborg","owner":"NixOS","description":"@ofborg tooling automation https://monitoring.ofborg.org/dashboard/db/ofborg","archived":false,"fork":false,"pushed_at":"2025-02-16T19:54:04.000Z","size":2460,"stargazers_count":269,"open_issues_count":149,"forks_count":163,"subscribers_count":33,"default_branch":"released","last_synced_at":"2025-04-22T05:21:58.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ofborg.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"nixos"}},"created_at":"2017-10-29T21:04:21.000Z","updated_at":"2025-04-18T20:25:21.000Z","dependencies_parsed_at":"2023-02-06T09:31:01.909Z","dependency_job_id":"5b9deca7-8408-44bb-9975-4f5b8acb3d61","html_url":"https://github.com/NixOS/ofborg","commit_stats":{"total_commits":1109,"total_committers":160,"mean_commits":6.93125,"dds":"0.45536519386834984","last_synced_commit":"5a4e743f192fb151915fcbe8789922fa401ecf48"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fofborg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fofborg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fofborg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Fofborg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/ofborg/tar.gz/refs/heads/released","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232400,"owners_count":21396636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:04:22.182Z","updated_at":"2025-04-22T11:32:49.009Z","avatar_url":"https://github.com/NixOS.png","language":"Rust","funding_links":["https://opencollective.com/nixos"],"categories":["Rust"],"sub_categories":[],"readme":"# ofborg\n\n## Guidelines\n\n1. Review the code of all PRs before triggering the bot on them.\n2. Be gentle; try not to run mass rebuilds or massive builds (like Chromium) on\n   it.\n\n## Automatic Building\n\nAll users will have their PRs automatically trigger builds if their commits\nfollow the well-defined format of Nixpkgs. Specifically: prefixing the commit\ntitle with the package attribute. This includes package bumps as well as other\nchanges.\n\nExample commit titles and the builds they will start:\n\n| Message                                                               | Automatic Build                                          |\n|-----------------------------------------------------------------------|----------------------------------------------------------|\n| `vim: 1.0.0 -\u003e 2.0.0`                                                 | `vim`                                                    |\n| `vagrant: Fix dependencies for version 2.0.2 `                        | `vagrant`                                                |\n| `python36Packages.requests,python27Packages.requests: 1.0.0 -\u003e 2.0.0` | `python36Packages.requests`, `python27Packages.requests` |\n| `python{27,310}Packages.requests: 1.0.0 -\u003e 2.0.0`                        | `python27Packages.requests`, `python310Packages.requests`   |\n\nWhen opening a PR with multiple commits, ofborg creates a single build job for\nall detected packages. If multiple commits get pushed to a PR one-by-one, each\ndetected package will get a separate build job.\n\nIf the title of a PR begins with `WIP:`, contains `[WIP]` anywhere, or has the\n`2.status: work-in-progress` label, its packages are not built automatically.\n**Note**: Marking a PR as a draft does not prevent automatic builds.\n\n## Commands\n\nThe comment parser is line-based, so commentary can be interwoven with\ninstructions for ofborg.\n\n1. To trigger the bot, the line _must_ start with `@ofborg` (case insensitive).\n   * **Note**: GitHub will not suggest `@ofborg` to you, but it will work all\n     the same. When in doubt, preview your comment and verify that `@ofborg`\n     links to https://github.com/ofborg/.\n2. To use multiple commands, separate them with whitespace. For examples, see\n   the \"[Multiple Commands](#multiple-commands)\" section.\n\n### test\n\n```\n@ofborg test list of tests\n```\n\nThis will run `nix-build ./default.nix -A nixosTests.list -A nixosTests.of -A\nnixosTests.tests` from the root of the Nixpkgs checkout.\n\nTests will run on all allowed machines. For more information, see the \"[Trusted\nUsers](#trusted-users)\" section.\n\n### eval\n\n```\n@ofborg eval\n```\n\nSee \"[How does ofborg call\n`nix-instantiate`?](#how-does-ofborg-call-nix-instantiate)\" for what command(s)\nthis will run.\n\n**Note**: Every PR automatically evaluates both upon creation and when the\ncommits change. There is no reason to run eval on a PR unless the evaluation\nfailed for weird reasons or master was previously broken.\n\n### build\n\n```\n@ofborg build list of attrs\n```\n\nThis will run `nix-build ./default.nix -A list -A of -A attrs` from the root of\nthe Nixpkgs checkout (see also \"[How does ofborg call\n`nix-build`?](#how-does-ofborg-call-nix-build)\").\n\nBuilds will run on all allowed machines. For more information, see the \"[Trusted\nUsers](#trusted-users)\" section.\n\n## Multiple Commands\n\nYou can use multiple commands in a variety ways. Here are some valid\ncombinations:\n\n*\n    ```\n    @ofborg build list of attrs\n    @ofborg eval\n    ```\n\n*\n    ```\n    @ofborg build list of attrs @ofborg eval\n    ```\n\n*\n    ```\n    looks good to me!\n    @ofborg eval\n    @ofborg build list of attrs\n    ```\n\n*\n    ```\n    @ofborg eval\n    @ofborg build list of attrs\n    looks good to me!\n    ```\n\n*\n    ```\n    @ofborg build list of attrs\n    @ofborg test list of attrs\n    ```\n\n* This will build `list`, `of`, `attrs`, `looks`, `good`, `to`, and `me!` (which is probably not what you want):\n    ```\n    @ofborg build list of attrs looks good to me!\n    ```\n\n## Trusted Users (Currently Disabled)\n\n\u003e **NOTE:** The Trusted Users functionality is currently disabled, as the\n\u003e current darwin builder is reset very frequently. This means that _all_ users\n\u003e will have their PRs build on the darwin machine.\n\nTrusted users have their builds and tests executed on _all_ available platforms,\nincluding those without good sandboxing. Because this exposes the host to a\nhigher risk of security issues, the trusted users list consists of only\nwell-known, trusted members of the community.\n\nAt the time of writing, trusted users have their builds and tests run on these\nplatforms:\n\n - `x86_64-linux`\n - `aarch64-linux`\n - `x86_64-darwin`\n - `aarch64-darwin`\n\nSee [`config.public.json`](./config.public.json) for a list of all trusted users.\n\n# How does ofborg call `nix-build`?\n\nofborg runs builds with a command similar to the following:\n\n```shell\n$ HOME=/homeless-shelter NIX_PATH=ofborg-nixpkgs-pr=$(pwd) nix-build ./default.nix \\\n    -A hello \\\n    --no-out-link \\\n    --keep-going \\\n    --option restrict-eval true \\ \n    --option build-timeout 1800 \\ \n    --argstr system thesystem \\\n    --show-trace\n```\n\n# How does ofborg call `nix-instantiate`?\n\nofborg runs NixOS evals with a command similar to the following:\n\n```shell\n$ HOME=/homeless-shelter NIX_PATH=ofborg-nixpkgs-pr=$(pwd) nix-instantiate ./nixos/release.nix \\\n    -A manual \\\n    --option restrict-eval true \\\n    --option build-timeout 1800 \\\n    --argstr system thesystem \\\n    --show-trace\n```\n\nofborg runs Nixpkgs evals with a command similar to the following:\n\n```shell\n$ HOME=/homeless-shelter NIX_PATH=ofborg-nixpkgs-pr=$(pwd) nix-instantiate ./pkgs/top-level/release.nix \\\n    -A manual \\\n    --option restrict-eval true \\\n    --option build-timeout 1800 \\\n    --argstr system thesystem \\\n    --show-trace\n```\n\n# Running meta checks locally\n\nTo run the meta checks, you will need the\n[`outpaths.nix`](./ofborg/src/outpaths.nix) file. You can acquire this file and\nrun the checks themselves like so:\n\n```shell\n$ curl -o outpaths.nix https://raw.githubusercontent.com/NixOS/ofborg/released/ofborg/src/outpaths.nix\n$ GC_INITIAL_HEAP_SIZE=4g nix-env -f ./outpaths.nix -qaP --no-name --out-path --arg checkMeta true \u003e out-paths\n```\n\n# Hacking\n\n```shell\n$ git clone https://github.com/NixOS/ofborg/\n$ cd ofborg\n$ nix-shell ./shell.nix\n$ cd ofborg # enter the subdirectory with Rust code\n# make your changes\n$ cargo build\n$ cargo check\n$ cargo test\n```\n\nTo test whether or not Continuous Integration will pass with your changes, you\ncan run the following commands from the root of your checkout:\n\n```shell\n$ nix-shell --pure --run checkPhase # checks rustfmt, clippy \u0026 runs the test suite\n$ nix-build -A ofborg.rs # build ofborg\n```\n\nCurrently there is no easy way to set up a test instance of ofborg. If `cargo\ncheck` and `cargo test` both succeed, feel free to Pull Request your changes.\nMake sure to format your code with `cargo fmt` and check for additional warnings\nwith `cargo clippy`.\n\nTo disable warnings as errors, run your command with an empty `RUSTFLAGS`. For\nexample:\n\n```shell\n$ RUSTFLAGS= cargo clippy\n```\n\nThis will override the default of `-D warnings` set in\n[`shell.nix`](./shell.nix), which tells Rust to error if it detects any\nwarnings.\n\n# Running a builder\n\nIf you want to run a builder of your own, check out the [wiki page on operating\na builder](https://github.com/NixOS/ofborg/wiki/Operating-a-Builder/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Fofborg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNixOS%2Fofborg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Fofborg/lists"}