about summary refs log tree commit diff
path: root/doc/submitting-changes.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/submitting-changes.xml')
-rw-r--r--doc/submitting-changes.xml171
1 files changed, 39 insertions, 132 deletions
diff --git a/doc/submitting-changes.xml b/doc/submitting-changes.xml
index a04ec08b0484..9c98abbe87ad 100644
--- a/doc/submitting-changes.xml
+++ b/doc/submitting-changes.xml
@@ -8,8 +8,7 @@
   <itemizedlist>
    <listitem>
     <para>
-     Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to
-     write packages for Nix)</link>.
+     Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to write packages for Nix)</link>.
     </para>
    </listitem>
    <listitem>
@@ -23,15 +22,11 @@
      <itemizedlist>
       <listitem>
        <para>
-        You can make branch from a commit of your local
-        <command>nixos-version</command>. That will help you to avoid
-        additional local compilations. Because you will receive packages from
-        binary cache.
+        You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache.
         <itemizedlist>
          <listitem>
           <para>
-           For example: <command>nixos-version</command> returns
-           <command>15.05.git.0998212 (Dingo)</command>. So you can do:
+           For example: <command>nixos-version</command> returns <command>15.05.git.0998212 (Dingo)</command>. So you can do:
           </para>
          </listitem>
         </itemizedlist>
@@ -55,9 +50,7 @@
      <itemizedlist>
       <listitem>
        <para>
-        If you removed pkgs, made some major NixOS changes etc., write about
-        them in
-        <command>nixos/doc/manual/release-notes/rl-unstable.xml</command>.
+        If you removed pkgs, made some major NixOS changes etc., write about them in <command>nixos/doc/manual/release-notes/rl-unstable.xml</command>.
        </para>
       </listitem>
      </itemizedlist>
@@ -65,8 +58,7 @@
    </listitem>
    <listitem>
     <para>
-     Check for unnecessary whitespace with <command>git diff --check</command>
-     before committing.
+     Check for unnecessary whitespace with <command>git diff --check</command> before committing.
     </para>
    </listitem>
    <listitem>
@@ -121,8 +113,7 @@ Additional information.
            <itemizedlist>
             <listitem>
              <para>
-              <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs
-              folder&gt;</command>
+              <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
              </para>
             </listitem>
            </itemizedlist>
@@ -134,14 +125,12 @@ Additional information.
            <itemizedlist>
             <listitem>
              <para>
-              Make sure it's in
-              <command>pkgs/top-level/all-packages.nix</command>
+              Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
              </para>
             </listitem>
             <listitem>
              <para>
-              <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs
-              folder&gt;</command>
+              <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
              </para>
             </listitem>
            </itemizedlist>
@@ -149,15 +138,11 @@ Additional information.
          </listitem>
          <listitem>
           <para>
-           <emphasis>If you don't want to install pkg in you
-           profile</emphasis>.
+           <emphasis>If you don't want to install pkg in you profile</emphasis>.
            <itemizedlist>
             <listitem>
              <para>
-              <command>nix-build -A pkg-attribute-name &lt;path to your local
-              nixpkgs folder&gt;/default.nix</command> and check results in the
-              folder <command>result</command>. It will appear in the same
-              directory where you did <command>nix-build</command>.
+              <command>nix-build -A pkg-attribute-name &lt;path to your local nixpkgs folder&gt;/default.nix</command> and check results in the folder <command>result</command>. It will appear in the same directory where you did <command>nix-build</command>.
              </para>
             </listitem>
            </itemizedlist>
@@ -165,9 +150,7 @@ Additional information.
          </listitem>
          <listitem>
           <para>
-           If you did <command>nix-env -i pkg-name</command> you can do
-           <command>nix-env -e pkg-name</command> to uninstall it from your
-           system.
+           If you did <command>nix-env -i pkg-name</command> you can do <command>nix-env -e pkg-name</command> to uninstall it from your system.
           </para>
          </listitem>
         </itemizedlist>
@@ -179,10 +162,7 @@ Additional information.
         <itemizedlist>
          <listitem>
           <para>
-           You can add new module to your NixOS configuration file (usually
-           it's <command>/etc/nixos/configuration.nix</command>). And do
-           <command>sudo nixos-rebuild test -I nixpkgs=&lt;path to your local
-           nixpkgs folder&gt; --fast</command>.
+           You can add new module to your NixOS configuration file (usually it's <command>/etc/nixos/configuration.nix</command>). And do <command>sudo nixos-rebuild test -I nixpkgs=&lt;path to your local nixpkgs folder&gt; --fast</command>.
           </para>
          </listitem>
         </itemizedlist>
@@ -193,9 +173,7 @@ Additional information.
    </listitem>
    <listitem>
     <para>
-     If you have commits <command>pkg-name: oh, forgot to insert
-     whitespace</command>: squash commits in this case. Use <command>git rebase
-     -i</command>.
+     If you have commits <command>pkg-name: oh, forgot to insert whitespace</command>: squash commits in this case. Use <command>git rebase -i</command>.
     </para>
    </listitem>
    <listitem>
@@ -220,8 +198,7 @@ Additional information.
      <itemizedlist>
       <listitem>
        <para>
-        Write the title in format <command>(pkg-name | nixos/&lt;module>):
-        improvement</command>.
+        Write the title in format <command>(pkg-name | nixos/&lt;module>): improvement</command>.
         <itemizedlist>
          <listitem>
           <para>
@@ -233,8 +210,7 @@ Additional information.
       </listitem>
       <listitem>
        <para>
-        Write in comment if you have tested your patch. Do not rely much on
-        <command>TravisCI</command>.
+        Write in comment if you have tested your patch. Do not rely much on <command>TravisCI</command>.
        </para>
       </listitem>
       <listitem>
@@ -244,8 +220,7 @@ Additional information.
       </listitem>
       <listitem>
        <para>
-        Notify maintainers of the package. For example add to the message:
-        <command>cc @jagajaga @domenkozar</command>.
+        Notify maintainers of the package. For example add to the message: <command>cc @jagajaga @domenkozar</command>.
        </para>
       </listitem>
      </itemizedlist>
@@ -257,64 +232,39 @@ Additional information.
   <title>Pull Request Template</title>
 
   <para>
-   The pull request template helps determine what steps have been made for a
-   contribution so far, and will help guide maintainers on the status of a
-   change. The motivation section of the PR should include any extra details
-   the title does not address and link any existing issues related to the pull
-   request.
+   The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
   </para>
 
   <para>
-   When a PR is created, it will be pre-populated with some checkboxes detailed
-   below:
+   When a PR is created, it will be pre-populated with some checkboxes detailed below:
   </para>
 
   <section xml:id="submitting-changes-tested-with-sandbox">
    <title>Tested using sandboxing</title>
 
    <para>
-    When sandbox builds are enabled, Nix will setup an isolated environment for
-    each build process. It is used to remove further hidden dependencies set by
-    the build environment to improve reproducibility. This includes access to
-    the network during the build outside of <function>fetch*</function>
-    functions and files outside the Nix store. Depending on the operating
-    system access to other resources are blocked as well (ex. inter process
-    communication is isolated on Linux); see
-    <link
-      xlink:href="https://nixos.org/nix/manual/#description-45">build-use-sandbox</link>
-    in Nix manual for details.
+    When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of <function>fetch*</function> functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see <link
+      xlink:href="https://nixos.org/nix/manual/#description-45">build-use-sandbox</link> in Nix manual for details.
    </para>
 
    <para>
-    Sandboxing is not enabled by default in Nix due to a small performance hit
-    on each build. In pull requests for
-    <link
-        xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link>
-    people are asked to test builds with sandboxing enabled (see
-    <literal>Tested using sandboxing</literal> in the pull request template)
-    because
-    in<link
-        xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link>
-    sandboxing is also used.
+    Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for <link
+        xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link> people are asked to test builds with sandboxing enabled (see <literal>Tested using sandboxing</literal> in the pull request template) because in<link
+        xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link> sandboxing is also used.
    </para>
 
    <para>
-    Depending if you use NixOS or other platforms you can use one of the
-    following methods to enable sandboxing
-    <emphasis role="bold">before</emphasis> building the package:
+    Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing <emphasis role="bold">before</emphasis> building the package:
     <itemizedlist>
      <listitem>
       <para>
-       <emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>:
-       add the following to <filename>configuration.nix</filename>
+       <emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>: add the following to <filename>configuration.nix</filename>
 <screen>nix.useSandbox = true;</screen>
       </para>
      </listitem>
      <listitem>
       <para>
-       <emphasis role="bold">Globally enable sandboxing on non-NixOS
-       platforms</emphasis>: add the following to:
-       <filename>/etc/nix/nix.conf</filename>
+       <emphasis role="bold">Globally enable sandboxing on non-NixOS platforms</emphasis>: add the following to: <filename>/etc/nix/nix.conf</filename>
 <screen>build-use-sandbox = true</screen>
       </para>
      </listitem>
@@ -326,11 +276,7 @@ Additional information.
    <title>Built on platform(s)</title>
 
    <para>
-    Many Nix packages are designed to run on multiple platforms. As such, it's
-    important to let the maintainer know which platforms your changes have been
-    tested on. It's not always practical to test a change on all platforms, and
-    is not required for a pull request to be merged. Only check the systems you
-    tested the build on in this section.
+    Many Nix packages are designed to run on multiple platforms. As such, it's important to let the maintainer know which platforms your changes have been tested on. It's not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
    </para>
   </section>
 
@@ -338,15 +284,8 @@ Additional information.
    <title>Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)</title>
 
    <para>
-    Packages with automated tests are much more likely to be merged in a timely
-    fashion because it doesn't require as much manual testing by the maintainer
-    to verify the functionality of the package. If there are existing tests for
-    the package, they should be run to verify your changes do not break the
-    tests. Tests only apply to packages with NixOS modules defined and can only
-    be run on Linux. For more details on writing and running tests, see the
-    <link
-        xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section
-    in the NixOS manual</link>.
+    Packages with automated tests are much more likely to be merged in a timely fashion because it doesn't require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the <link
+        xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section in the NixOS manual</link>.
    </para>
   </section>
 
@@ -354,11 +293,7 @@ Additional information.
    <title>Tested compilation of all pkgs that depend on this change using <command>nix-review</command></title>
 
    <para>
-    If you are updating a package's version, you can use nix-review to make
-    sure all packages that depend on the updated package still compile
-    correctly. The <command>nix-review</command> utility can look for and build
-    all dependencies either based on uncommited changes with the
-    <literal>wip</literal> option or specifying a github pull request number.
+    If you are updating a package's version, you can use nix-review to make sure all packages that depend on the updated package still compile correctly. The <command>nix-review</command> utility can look for and build all dependencies either based on uncommited changes with the <literal>wip</literal> option or specifying a github pull request number.
    </para>
 
    <para>
@@ -376,13 +311,7 @@ Additional information.
    <title>Tested execution of all binary files (usually in <filename>./result/bin/</filename>)</title>
 
    <para>
-    It's important to test any executables generated by a build when you change
-    or create a package in nixpkgs. This can be done by looking in
-    <filename>./result/bin</filename> and running any files in there, or at a
-    minimum, the main executable for the package. For example, if you make a
-    change to <package>texlive</package>, you probably would only check the
-    binaries associated with the change you made rather than testing all of
-    them.
+    It's important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in <filename>./result/bin</filename> and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to <package>texlive</package>, you probably would only check the binaries associated with the change you made rather than testing all of them.
    </para>
   </section>
 
@@ -390,14 +319,8 @@ Additional information.
    <title>Meets Nixpkgs contribution standards</title>
 
    <para>
-    The last checkbox is fits
-    <link
-        xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>.
-    The contributing document has detailed information on standards the Nix
-    community has for commit messages, reviews, licensing of contributions you
-    make to the project, etc... Everyone should read and understand the
-    standards the community has for contributing before submitting a pull
-    request.
+    The last checkbox is fits <link
+        xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>. The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
    </para>
   </section>
  </section>
@@ -435,22 +358,17 @@ Additional information.
   <itemizedlist>
    <listitem>
     <para>
-     Commits must be sufficiently tested before being merged, both for the
-     master and staging branches.
+     Commits must be sufficiently tested before being merged, both for the master and staging branches.
     </para>
    </listitem>
    <listitem>
     <para>
-     Hydra builds for master and staging should not be used as testing
-     platform, it's a build farm for changes that have been already tested.
+     Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.
     </para>
    </listitem>
    <listitem>
     <para>
-     When changing the bootloader installation process, extra care must be
-     taken. Grub installations cannot be rolled back, hence changes may break
-     people's installations forever. For any non-trivial change to the
-     bootloader please file a PR asking for review, especially from @edolstra.
+     When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.
     </para>
    </listitem>
   </itemizedlist>
@@ -473,20 +391,12 @@ Additional information.
    <itemizedlist>
     <listitem>
      <para>
-      It's only for non-breaking mass-rebuild commits. That means it's not to
-      be used for testing, and changes must have been well tested already.
-      <link xlink:href="https://web.archive.org/web/20160528180406/http://comments.gmane.org/gmane.linux.distributions.nixos/13447">Read
-      policy here</link>.
+      It's only for non-breaking mass-rebuild commits. That means it's not to be used for testing, and changes must have been well tested already. <link xlink:href="https://web.archive.org/web/20160528180406/http://comments.gmane.org/gmane.linux.distributions.nixos/13447">Read policy here</link>.
      </para>
     </listitem>
     <listitem>
      <para>
-      If the branch is already in a broken state, please refrain from adding
-      extra new breakages. Stabilize it for a few days, merge into master, then
-      resume development on staging.
-      <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep
-      an eye on the staging evaluations here</link>. If any fixes for staging
-      happen to be already in master, then master can be merged into staging.
+      If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep an eye on the staging evaluations here</link>. If any fixes for staging happen to be already in master, then master can be merged into staging.
      </para>
     </listitem>
    </itemizedlist>
@@ -498,10 +408,7 @@ Additional information.
    <itemizedlist>
     <listitem>
      <para>
-      If you're cherry-picking a commit to a stable release branch, always use
-      <command>git cherry-pick -xe</command> and ensure the message contains a
-      clear description about why this needs to be included in the stable
-      branch.
+      If you're cherry-picking a commit to a stable release branch, always use <command>git cherry-pick -xe</command> and ensure the message contains a clear description about why this needs to be included in the stable branch.
      </para>
      <para>
       An example of a cherry-picked commit would look like this: