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

calibre: remove references to podofo to reduce closure size #49856

Merged
merged 1 commit into from Nov 8, 2018

Conversation

andrew-d
Copy link
Contributor

@andrew-d andrew-d commented Nov 7, 2018

Motivation for this change

This reduces the closure size (on 18.09) from ~841 to ~833 MiB; not a huge win, but given that every other library in Calibre has a lib/dev output, probably worth doing?

$ nix path-info -S /nix/store/k3mhm3a85r6x7xml9aab261mfxw8kgiv-calibre-3.30.0
/nix/store/k3mhm3a85r6x7xml9aab261mfxw8kgiv-calibre-3.30.0	  882307120
$ nix path-info -S /nix/store/gqpz53zbc90v70x8kq9smng61nh18q6a-calibre-3.30.0              
/nix/store/gqpz53zbc90v70x8kq9smng61nh18q6a-calibre-3.30.0	  874079880

In order to do this, we split podofo into multiple outputs (since podofo.dev has references to a bunch of -dev libraries itself, we need to split it into its' own output).

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

cc @domenkozar @pSub @AndersonTorres (maintainers of calibre)

remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
'';

disallowedReferences = [ podofo.dev ];
Copy link
Member

Choose a reason for hiding this comment

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

Is podofo.out still there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, just podofo.lib; the .out output is all binaries and manpages. Given that, I didn't think it was worth adding it to the list of disallowedReferences, but happy to change if you think it's worth it?

Copy link
Member

Choose a reason for hiding this comment

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

Ok looks good then.

@matthewbauer matthewbauer merged commit c5080e9 into NixOS:master Nov 8, 2018
@andrew-d andrew-d deleted the andrew/podofo-closure-size branch November 9, 2018 06:47
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