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

docs: use overrideAttrs instead of overrideDerivation #20001

Conversation

aneeshusa
Copy link
Contributor

@aneeshusa aneeshusa commented Oct 30, 2016

Motivation for this change

Fixes #10721.
cc @vcunat

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • 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.

Update the docs to use overrideAttrs instead of overrideDerivation.
There are also ~110 other uses of overrideDerivation in actual Nix code, which I will save for separate PR(s).

@mention-bot
Copy link

@aneeshusa, thanks for your PR! By analyzing the history of the files in this pull request, we identified @thatdocslady, @rvl and @fpletz to be potential reviewers.

@aneeshusa aneeshusa force-pushed the use-overrideAttrs-instead-of-overrideDerivation-in-docs branch 2 times, most recently from bcc07d0 to 2df7eaa Compare October 30, 2016 16:41
<programlisting>
nixpkgs.config.packageOverrides = pkgs: {
hello = pkgs.lib.overrideDerivation pkgs.hello (attrs: {
hello = pkgs.lib.overrideAttrs pkgs.hello (attrs: {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be:

    hello = pkgs.hello.overrideAttrs (oldAttrs: {
      separateDebugInfo = true;
    });

];
environment.systemPackages = [
(pkgs.lib.overrideAttrs pkgs.emacs (oldAttrs: {
name = "emacs-25.0-pre";
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no lib.overrideAttrs, only emacs.overrideAttrs it seems.

@aneeshusa aneeshusa force-pushed the use-overrideAttrs-instead-of-overrideDerivation-in-docs branch from 2df7eaa to 309f414 Compare October 30, 2016 18:33
@aneeshusa aneeshusa force-pushed the use-overrideAttrs-instead-of-overrideDerivation-in-docs branch from 309f414 to 3d99eea Compare October 30, 2016 18:34
@vcunat vcunat merged commit 3d99eea into NixOS:master Nov 5, 2016
@vcunat
Copy link
Member

vcunat commented Nov 5, 2016

I just slightly amended one formulation in 559ddae.

@aneeshusa aneeshusa deleted the use-overrideAttrs-instead-of-overrideDerivation-in-docs branch January 7, 2022 03:04
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