haskellPackages.Agda: Split outputs to reduce closure size#302351
haskellPackages.Agda: Split outputs to reduce closure size#302351ncfavier merged 1 commit intoNixOS:masterfrom
Conversation
After enabling a separate binary output for the `Agda` Haskell package, the new `bin` output measures ~100MiB, compared to the ~4.5GiB before. Using it in `agdaWithPackages` reduces the closure size of an Agda installation from ~5GiB to ~3GiB. The remaining space is taken up mostly by the GHC backend. With this change, derivations depending on `haskellPackages.Agda` directly need to pick the right (binary) output. This concerns in particular `emacsPackages.agda2-mode`.
7f6859c to
294245f
Compare
|
@ofborg build agda.passthru.tests.allPackages |
|
I believe I very much like this, thank you for your work :-), but can probably only test on Saturday. |
|
All tests seem to pass; I'll mark this PR as ready for review. This is my first time working on code that a lot of packages depend on, so any feedback and comments are appreciated. I have used this successfully locally for Agda development with Neovim + cornelis. Can anyone who uses
Thank you, I'd appreciate that a lot! |
| inherit (Agda) meta; | ||
| # Agda is a split package with multiple outputs; do not inherit them here. | ||
| meta = removeAttrs Agda.meta [ "outputsToInstall" ]; |
There was a problem hiding this comment.
The interaction of multiple-output packages and outputsToInstall was very surprising to me (Why does changing a meta attribute cause an evaluation error?? I believe I ran into #255947). Is removing outputsToInstall for the derived package the right thing to do here?
|
I have now tested this with my workflow -- everything works as it should. (I'm using the agda-mode for Emacs, however I'm not using emacsPackages.agda-mode.) Thank you for your work! Unfortunately I cannot comment on your question regading I propose to handle the issue of unconditional dependency on GHC at some later point and don't hold off this pull request just for that reaon. |
After enabling a separate binary output for the
AgdaHaskell package, the newbinoutput measures ~100MiB, compared to the ~4.5GiB before. Using it inagdaWithPackagesreduces the closure size of an Agda installation from ~5GiB to ~3GiB. The remaining space is taken up mostly by the GHC backend.With this change, derivations depending on
haskellPackages.Agdadirectly need to pick the right (binary) output. This concerns in particularemacsPackages.agda2-mode.This is an attempt to resolve #285261.
Description of changes
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.