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

Add recurse overlay #43832

Closed
wants to merge 2 commits into from
Closed

Conversation

matthewbauer
Copy link
Member

Motivation for this change

This moves all of the recurseIntoAttrs calls to the recurse.nix file. That overlay is applied after allPackages UNLESS you have config.dontRecurse set to true. This can significantly speed up nix-env -qa evaluation at the cost of less packages listed.

$ time nix-env -qa -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz >/dev/null
8.319 secs

$ time nix-env -qa -f https://github.com/matthewbauer/nixpkgs/archive/recurse-overlay.tar.gz --arg config '{dontRecurse=true;}' >/dev/null
3.805 secs

$ nix-env -qa -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz | wc -l
16284

$ nix-env -qa -f https://github.com/matthewbauer/nixpkgs/archive/recurse-overlay.tar.gz --arg config '{dontRecurse=true;}' | wc -l
7975

This is an overlay that will add the recurse attribute for nix-env &
hydra. It can now be disabled with the config.dontRecurse option.
These either had no effect or didn’t make sense in the context.
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

2 participants