···224224</section>
225225226226<section>
227227+ <title>Pull Request Template</title>
228228+ <para>
229229+ The pull request template helps determine what steps have been made for a
230230+ contribution so far, and will help guide maintainers on the status of a
231231+ change. The motivation section of the PR should include any extra details
232232+ the title does not address and link any existing issues related to the pull
233233+ request.
234234+ </para>
235235+ <para>When a PR is created, it will be pre-populated with some checkboxes detailed below:
236236+ </para>
237237+ <section>
238238+ <title>Tested using sandboxing</title>
239239+ <para>
240240+ When sandbox builds are enabled, Nix will setup an isolated environment
241241+ for each build process. It is used to remove further hidden dependencies
242242+ set by the build environment to improve reproducibility. This includes
243243+ access to the network during the build outside of
244244+ <function>fetch*</function> functions and files outside the Nix store.
245245+ Depending on the operating system access to other resources are blocked
246246+ as well (ex. inter process communication is isolated on Linux); see <link
247247+ xlink:href="https://nixos.org/nix/manual/#description-45">build-use-sandbox</link>
248248+ in Nix manual for details.
249249+ </para>
250250+ <para>
251251+ Sandboxing is not enabled by default in Nix due to a small performance
252252+ hit on each build. In pull requests for <link
253253+ xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link> people
254254+ are asked to test builds with sandboxing enabled (see <literal>Tested
255255+ using sandboxing</literal> in the pull request template) because
256256+ in<link
257257+ xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link>
258258+ sandboxing is also used.
259259+ </para>
260260+ <para>
261261+ Depending if you use NixOS or other platforms you can use one of the
262262+ following methods to enable sandboxing <emphasis role="bold">before</emphasis> building the package:
263263+ <itemizedlist>
264264+ <listitem>
265265+ <para>
266266+ <emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>:
267267+ add the following to
268268+ <filename>configuration.nix</filename>
269269+ <screen>nix.useSandbox = true;</screen>
270270+ </para>
271271+ </listitem>
272272+ <listitem>
273273+ <para>
274274+ <emphasis role="bold">Globally enable sandboxing on non-NixOS platforms</emphasis>:
275275+ add the following to: <filename>/etc/nix/nix.conf</filename>
276276+ <screen>build-use-sandbox = true</screen>
277277+ </para>
278278+ </listitem>
279279+ </itemizedlist>
280280+ </para>
281281+282282+ </section>
283283+ <section>
284284+ <title>Built on platform(s)</title>
285285+ <para>
286286+ Many Nix packages are designed to run on multiple
287287+ platforms. As such, it's important to let the maintainer know which
288288+ platforms your changes have been tested on. It's not always practical to
289289+ test a change on all platforms, and is not required for a pull request to
290290+ be merged. Only check the systems you tested the build on in this
291291+ section.
292292+ </para>
293293+ </section>
294294+ <section>
295295+ <title>Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)</title>
296296+ <para>
297297+ Packages with automated tests are much more likely to be merged in a
298298+ timely fashion because it doesn't require as much manual testing by the
299299+ maintainer to verify the functionality of the package. If there are
300300+ existing tests for the package, they should be run to verify your changes
301301+ do not break the tests. Tests only apply to packages with NixOS modules
302302+ defined and can only be run on Linux. For more details on writing and
303303+ running tests, see the <link
304304+ xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section
305305+ in the NixOS manual</link>.
306306+ </para>
307307+ </section>
308308+ <section>
309309+ <title>Tested compilation of all pkgs that depend on this change using <command>nox-review</command></title>
310310+ <para>
311311+ If you are updating a package's version, you can use nox to make sure all
312312+ packages that depend on the updated package still compile correctly. This
313313+ can be done using the nox utility. The <command>nox-review</command>
314314+ utility can look for and build all dependencies either based on
315315+ uncommited changes with the <literal>wip</literal> option or specifying a
316316+ github pull request number.
317317+ </para>
318318+ <para>
319319+ review uncommitted changes:
320320+ <screen>nix-shell -p nox --run nox-review wip</screen>
321321+ </para>
322322+ <para>
323323+ review changes from pull request number 12345:
324324+ <screen>nix-shell -p nox --run nox-review pr 12345</screen>
325325+ </para>
326326+ </section>
327327+ <section>
328328+ <title>Tested execution of all binary files (usually in <filename>./result/bin/</filename>)</title>
329329+ <para>
330330+ It's important to test any executables generated by a build when you
331331+ change or create a package in nixpkgs. This can be done by looking in
332332+ <filename>./result/bin</filename> and running any files in there, or at a
333333+ minimum, the main executable for the package. For example, if you make a change
334334+ to <package>texlive</package>, you probably would only check the binaries
335335+ associated with the change you made rather than testing all of them.
336336+ </para>
337337+ </section>
338338+ <section>
339339+ <title>Meets nixpkgs contribution standards</title>
340340+ <para>
341341+ The last checkbox is fits <link
342342+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>.
343343+ The contributing document has detailed information on standards the Nix
344344+ community has for commit messages, reviews, licensing of contributions
345345+ you make to the project, etc... Everyone should read and understand the
346346+ standards the community has for contributing before submitting a pull
347347+ request.
348348+ </para>
349349+350350+ </section>
351351+</section>
352352+353353+<section>
227354<title>Hotfixing pull requests</title>
228355229356<itemizedlist>