Jump to content

Nixpkgs/Contributing: Difference between revisions

Link to CONTRIBUTING.md
imported>Milahu
m (lint nix)
imported>Artturin
(Link to CONTRIBUTING.md)
Line 9: Line 9:
If you want to see your package being provided by a channel, creating an issue will most likely not enough. It is up to you to create a [[Contributing to Nixpkgs|nix package description]] in Nixpkgs and create a pull request in the Nixpkgs repository. Pull requests are a way to tell a GitHub project that you've created some changes, which maintainers can easily review, comment on and, and finally merge into the repository.
If you want to see your package being provided by a channel, creating an issue will most likely not enough. It is up to you to create a [[Contributing to Nixpkgs|nix package description]] in Nixpkgs and create a pull request in the Nixpkgs repository. Pull requests are a way to tell a GitHub project that you've created some changes, which maintainers can easily review, comment on and, and finally merge into the repository.


Here's how to create a pull request on GitHub:
See [https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#how-to-create-pull-requests How to create pull requests] in nixpkgs CONTRIBUTING.md.
 
=== Fork Nixpkgs on Github ===
 
Create a GitHub account and fork the [https://github.com/NixOS/nixpkgs nixpkgs repository].  
 
=== Add a remote ===
 
On your host, create a new remote location:
<syntaxhighlight lang="bash">
# add your github clone as remote location:
YOUR_GITHUB_NAME=fill-in
git remote add $YOUR_GITHUB_NAME git@github.com:$YOUR_GITHUB_NAME/nixpkgs.git
</syntaxhighlight>


=== Hack Nixpkgs ===
=== Hack Nixpkgs ===
Line 34: Line 21:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo nixos-rebuild switch -I nixpkgs=/path/to/local/nixpkgs
sudo nixos-rebuild switch -I nixpkgs=/path/to/local/nixpkgs
</syntaxhighlight>
=== Commit your change locally ===
Commit your change to your local clone of the repository:
<syntaxhighlight lang="bash">
git add FILE_LIST # use git add --patch as needed
git commit
=== Check status ===
Verify everything is ok - no unexpected dangling files git does not know about yet:
git status
</syntaxhighlight>
</syntaxhighlight>


Anonymous user