Home Explore Blog Models CI



nix

2nd chunk of `CONTRIBUTING.md`
e5fbf4871e1cca191598bd2d43da8411c26545e671eced5c0000000100000986
   If there is no relevant issue yet and you're not sure whether your change is likely to be accepted, [open an issue](https://github.com/NixOS/nix/issues/new/choose) yourself.

2. Check for [pull requests](https://github.com/NixOS/nix/pulls) that might already cover the contribution you are about to make.
   There are many open pull requests that might already do what you intend to work on.
   You can use [labels](https://github.com/NixOS/nix/labels) to filter for relevant topics.

3. Check the [Nix reference manual](https://nix.dev/manual/nix/development/development/building.html) for information on building Nix and running its tests.

   For contributions to the command line interface, please check the [CLI guidelines](https://nix.dev/manual/nix/development/development/cli-guideline.html).

4. Make your change!

5. [Create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for your changes.
   * Clearly explain the problem that you're solving.

     Link related issues to inform interested parties and future contributors about your change.
     If your pull request closes one or multiple issues, mention that in the description using `Closes: #<number>`, as it will then happen automatically when your change is merged.
   * Credit original authors when you're reusing or building on their work.
   * Link to relevant changes in other projects, so that others can understand the full context of the change in the future when you or someone else will change or troubleshoot the code.
     This is especially important when your change is based on work done in other repositories.

     Example:
     ```
     This is based on the work of @user in <url>.
     This solution took inspiration from <url>.

     Co-authored-by: User Name <user@example.com>
     ```

     When cherry-picking from a different repository, use the `-x` flag, and then amend the commits to turn the hashes into URLs.

   * Make sure to have [a clean history of commits on your branch by using rebase](https://www.digitalocean.com/community/tutorials/how-to-rebase-and-update-a-pull-request).
   * [Mark the pull request as draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) if you're not done with the changes.

Title: Making Changes and Submitting Pull Requests to Nix
Summary
This section details the final steps for contributing code changes to Nix. It advises opening an issue if the proposed change's acceptance is uncertain and checking existing pull requests to avoid duplicate work. Contributors should consult the Nix reference manual and CLI guidelines for building, testing, and interface standards. When creating a pull request, it's essential to clearly explain the problem, link related issues (using `Closes:` for automatic closure), credit original authors, link to relevant external changes, maintain a clean commit history using rebase, and mark the PR as a draft if it's not yet complete.