Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nixpkgs manual: expand documentation for overlays #28082

Merged
merged 2 commits into from Aug 13, 2017

Conversation

michaelpj
Copy link
Contributor

Motivation for this change

This expands the documentation on overlays on a few points which confused me when I was trying to use them:

  • The exact way in which the list of overlays is computed.
  • What happens on NixOS, especially what happens with nixpkgs.overlays.
  • How to set a value for <nixpkgs-overlays>.
  • The relationship between overlays and the other commonly advertised way of overriding packages, packageOverrides.

I wasn't sure whether it was right to discuss NixOS issues in the Nixkpgs manual, but it seems to be done in other places, so I left it in. Ideally, it would be nice to be able to link from the NixOS manual to the Nixpkgs manual, but I'm not sure if this is possible?

Things done

Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.


<para>The set of overlays is looked for in the following places. The
first one present is considered, and all the rest are ignored:
<para>The list of overlays is determined as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I missed it, but seems like the new version does not mention that only the first match is used (or is that not actually the case?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worded the list items using "otherwise" to indicate that each one only applies if the conditions from the previous ones didn't hold, but perhaps it's not clear?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean.

Copy link
Member

@nbp nbp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this sounds good, fix the following nit, and it would be good to be merged.

Thanks.

doc/overlays.xml Outdated
<filename>default.nix</filename>, or a symlink to one of those. The expressions should follow
the syntax described in <xref linkend="sec-overlays-layout"/>.</para>
<para>For the second and third options overlays can be provided as files,
directories containing a <filename>default.nix</filename>, or symlinks to one of those.</para>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For the second and third options*,* overlays are registered in the given directory as files, directories containing …

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, changed.

@nbp nbp merged commit 5bc183e into NixOS:master Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants