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

Fix dontRecurseIntoAttrs + add to lib + doc #68491

Merged
merged 3 commits into from Mar 1, 2020

Conversation

roberth
Copy link
Member

@roberth roberth commented Sep 11, 2019

Motivation for this change
  • dontRecurseIntoAttrs didn't do what it said
  • it and recurseIntoAttrs are valid and useful outside a full nixpkgs invocation

Additionally, I will soon backport only the lib.recurseIntoAttrs addition to 19.03 and 19.09.
The dont fix might kill someone's build setup, when they have a with lib inside a with pkgs...

(Reminder: avoid with; use inherit.)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

This makes the function available without having to evaluate the
Nixpkgs fix-point, making it available in a more natural way for
code that deals with multiple Nixpkgs invocations.

Its definition is coupled to Nix rather than Nixpkgs, so it will
feel right at home in lib.
dontRecurseIntoAttrs was a noop (x: x), causing the expression
dontRecurseIntoAttrs (recurseIntoAttrs a) to have the wrong effect.
@roberth roberth changed the title Fix dontRecurseIntoAttrs + add to lib Fix dontRecurseIntoAttrs + add to lib + doc Sep 11, 2019
@lheckemann lheckemann added this to the 20.03 milestone Sep 12, 2019
@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 5, 2020
@roberth roberth merged commit e38a01d into NixOS:master Mar 1, 2020
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

6 participants