Background
About one year ago, I started using NixOS and submitted my first Pull Request (PR) to nixpkgs.
Today I submitted my 5th PR after not having submitted one in 3 months.
Even though I already got 4 PRs merged, I admittedly still haven’t understood all Things done items from the Pull Request Template.
That said, I think it could be made more beginner friendly, which I’m intending to do by asking a couple of beginner’s questions (that I had or still have) and hopefully the Nix community may be able to answer:
Questions
Tested using sandboxing (nix.useSandbox on NixOS, or option
sandbox
innix.conf
on non-NixOS)
Okay, so I have to test “using sandboxing”. But:
- Where I do put the
nix.useSandbox
option?
(Do I have to include it in my/etc/nixos/configuration.nix
or can I pass it directly to whatever tool I have to use for the test?) - How do I actually test?
(Is there a command to test? Or is this just a prerequisite for the following “Tested …” items?)
Built on platform(s)
- Am I expected to test multiple platforms or is this just an info?
(If it is just an info, it maybe shouldn’t be under “Things done”.)
macOS
- Is this the same as “darwin”?
other Linux distributions
- This means using the Nix package manager in another Linux distro, right?
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Okay, so I should look inside nixos/tests
. But:
- How do I find out if there’s a test applicable for my change?
- And if there is, how do I actually run that test?
- And if there is not, how can I add a test myself?
Tested compilation of all pkgs that depend on this change using
nix-shell -p nox --run "nox-review wip"
Okay, so I should probably run this inside my branch, but wip
seems to only work when the changes are not yet committed.
- How can I test the compilation for my committed changes?
Tested execution of all binary files (usually in
./result/bin/
)
Okay, so I should test the binary files that are usually in ./result/bin
. But:
- What command do I have to run in order to create those binary files in the first place?
- And where do I find the result then?
(It’s a relative path, but relative to which path? The path I ran the build command in?)
Determined the impact on package closure size (by running
nix path-info -S
before and after)
Okay, so when I run this in my branch I get the following:
$ nix path-info -S
error: Please be informed that this pseudo-package is not the only part of
Nixpkgs that fails to evaluate. You should not evaluate entire Nixpkgs
without some special measures to handle failing packages, like those taken
by Hydra.
- How do determine the impact correctly?
- And what do I do with that output, just paste it here [in the PR]?
Other than that, I was a bit confused by @GrahamcOfBorg
:
- What do the labels mean, e.g.:
- I saw that others interacted with
@GrahamcOfBorg
: Should I as well? E.g.: