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

tree-wide: do not use pkgs.extend in nixpkgs #105452

Merged
merged 1 commit into from Nov 30, 2020
Merged

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Nov 30, 2020

Motivation for this change

Each invocation of pkgs.extends adds 130MB of allocation to the hydra
evaluator. We are already struggling with the amount of memory nixpkgs
requires.

pkgs.extend is a useful escape-hatch, but should be not be used inside
of nixpkgs directly.

Data source: https://hydra.nixos.org/job/nixos/release-20.09/nixpkgs.metrics#tabs-charts

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

Each invocation of pkgs.extends adds 130MB of allocation to the hydra
evaluator. We are already struggling with the amount of memory nixpkgs
requires.

`pkgs.extend` is a useful escape-hatch, but should be not be used inside
of nixpkgs directly.
@grahamc
Copy link
Member

grahamc commented Nov 30, 2020

Nice, this cuts the heap size by 20%! (See the ofborg performance report check)

@zimbatm
Copy link
Member Author

zimbatm commented Nov 30, 2020

@AndersonTorres
Copy link
Member

LVGTM

@grahamc grahamc merged commit f18e57f into NixOS:master Nov 30, 2020
@zimbatm zimbatm deleted the no-extend branch November 30, 2020 19:48
@das-g
Copy link
Member

das-g commented Dec 8, 2020

When deprecating something like this, can alternatives be pointed out, please? I'd like to continue to use QGIS but have no idea how to un-break it.

(Kudos though for properly marking affected applications as broken instead of just letting the builds fail lazily. 👍)

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