@@ -0,0 +1,68 @@
5+* Make sure you have a [GitHub account](https://github.com/signup/free)
6+* Submit a ticket for your issue, assuming one does not already exist.
7+ * Clearly describe the issue including steps to reproduce when it is a bug.
11+* Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
12+* Fork the repository on GitHub.
13+* Create a branch for your future fix.
14+ * You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will recieve some packages from cache server.
15+ * For example: `nixos-version` returns `15.05.git.0998212 (Dingo)`. So you can do:
19+ git checkout -b 'fix/pkg-name-update'
21+ * Please avoid working directly on the `master` branch.
22+* Make commits of logical units.
23+ * If you removed pkgs, made some major changes etc., write about them in `nixos/doc/manual/release-notes/rl-unstable.xml`.
24+* Check for unnecessary whitespace with `git diff --check` before committing.
25+* Format the commit in a following way:
28+ (pkg-name | service-name): (update from -> to | init at version | refactor | etc)
30+ Additional information.
33+ * `foo-pkg: init at 2.0.1`
34+ * `bar-pkg: update 3.0 -> 3.1.1`
35+ * `lala-service: add bazBaz option`
36+ * `tata-service: refactor config generation`
37+* Test your changes. If you work with
40+ * `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
42+ * Make sure it's in `pkgs/top-level/all-packages.nix`
43+ * `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
44+ * _If you don't want to install pkg in you profile_.
45+ * `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
46+ * If you did `nix-env -i pkg-name` you can do `nix-env -e pkg-name` to uninstall it from your system.
47+ * nixos and it's modules
48+ * You can add new module to you `nixos-configuration file` (usually it's `/etc/nixos/configuration.nix`.
49+ And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`
50+* If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
51+* Rebase you branch against current `master`.
55+* Push your changes to your fork of nixpkgs.
56+* Create pull request.
57+ * Write the title in format `(pkg-name | service): improvement`
58+ * If you update the pkg, write versions `from -> to`
59+ * Write in comment if you have tested your patch. Do not rely much on `TravisCL`.
60+ * If you make an improvement, write why is it good.
61+ * Notify maintainers of the package. For example add to the message: `cc @jagajaga @domenkozar`
63+## Hotfixing pull requests
65+* Make the appropriate changes in you branch.
66+* Don't create additional commits.
68+ * `git push --force` to your branch.