Skip to content

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

Merged
matthewbauer merged 1 commit intoNixOS:masterfrom
andrew-d:andrew/podofo-closure-size
Nov 8, 2018
Merged

calibre: remove references to podofo to reduce closure size#49856
matthewbauer merged 1 commit intoNixOS:masterfrom
andrew-d:andrew/podofo-closure-size

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)

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 7, 2018
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

@matthewbauer matthewbauer Nov 8, 2018

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

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants