Welcome and thank you for your interest in contributing to Nix! We appreciate your support.
Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved.
-
Check on the GitHub issue tracker if your bug was already reported.
-
If you were not able to find the bug or feature open a new issue
-
The issue templates will guide you in specifying your issue. The more complete the information you provide, the more likely it can be found by others and the more useful it is in the future. Make sure reported bugs can be reproduced easily.
-
Once submitted, do not expect issues to be picked up or solved right away. The only way to ensure this, is to work on the issue yourself.
Check out the security policy.
-
Search for related issues that cover what you're going to work on. It could help to mention there that you will work on the issue.
We strongly recommend first-time contributors not to propose new features but rather fix tightly-scoped problems in order to build trust and a working relationship with maintainers.
Issues labeled good first issue should be relatively easy to fix and are likely to get merged quickly. Pull requests addressing issues labeled idea approved or RFC are especially welcomed by maintainers and will receive prioritised review.
If you are proficient with C++, addressing one of the popular issues will be highly appreciated by maintainers and Nix users all over the world. For far-reaching changes, please investigate possible blockers and design implications, and coordinate with maintainers before investing too much time in writing code that may not end up getting merged.
If there is no relevant issue yet and you're not sure whether your change is likely to be accepted, open an issue yourself.
-
Check for pull requests 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 to filter for relevant topics.
-
Check the Nix reference manual for information on building Nix and running its tests.
For contributions to the command line interface, please check the CLI guidelines.
-
Make your change!
-
Create 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.
-
Mark the pull request as draft if you're not done with the changes.
-
-
Do not expect your pull request to be reviewed immediately. Nix maintainers follow a structured process for reviews and design decisions, which may or may not prioritise your work.
Following this checklist will make the process smoother for everyone:
- Fixes an idea approved issue
- Tests, as appropriate:
- Functional tests –
tests/functional/**.sh
- Unit tests –
src/*/tests
- Integration tests –
tests/nixos/*
- Functional tests –
- User documentation in the manual
- API documentation in header files
- Code and comments are self-explanatory
- Commit message explains why the change was made
- New feature or incompatible change: add a release note
-
If you need additional feedback or help to getting pull request into shape, ask other contributors using @mentions.
The Nix reference manual is hosted on https://nixos.org/manual/nix.
The underlying source files are located in doc/manual/source
.
For small changes you can use GitHub to edit these files
For larger changes see the Nix reference manual.
Whenever you're stuck or do not know how to proceed, you can always ask for help. We invite you to use our Matrix room to ask questions.