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

pqiv: add dependencies needed to enable all backends #32678

Merged
merged 1 commit into from Dec 15, 2017

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Dec 14, 2017

Motivation for this change

Support more formats by default! :)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@dtzWill
Copy link
Member Author

dtzWill commented Dec 14, 2017

FWIW, as far as closure sizes and thoughts on backends to use by default:

Current / minimal backends: 140MB
Adding libarchive, libwebp: 142MB
Adding libarchive, libwebp, poppler: 161MB
... + libspectre (PS support) : 224MB
... + imagemagick (misc): 247MB
... + ffmpeg (video): 287MB

Seems libarchive/libwebp might as well be included, not sure which of the rest are reasonable defaults.

Video seems like an opt-in backend, since it's relatively heavy-weight and pqiv doesn't support sound.
Imagemagick backend supports a number of things, including PDF/PS and PSD support, apparently?

++ stdenv.lib.optional supportPDF poppler
++ stdenv.lib.optional supportPS libspectre
++ stdenv.lib.optional supportVideo ffmpeg
++ stdenv.lib.optional supportWebP libwebp;
Copy link
Member

@Mic92 Mic92 Dec 14, 2017

Choose a reason for hiding this comment

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

Do we really need options for all dependencies?
People can do pqiv.override { libarchive = null; } to disable dependencies.

Copy link
Member

@Mic92 Mic92 Dec 14, 2017

Choose a reason for hiding this comment

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

Also

qiv = callPackage ../applications/graphics/pqiv {
  inherit (config.pqiv) enablePDF;
};

is a better approach, since it does not pull options from global namespace.

@orivej
Copy link
Contributor

orivej commented Dec 14, 2017

@dtzWill pqiv is a desktop application, so such things as libarchive, libwebp, poppler, imagemagick, ffmpeg are likely present anyway: just add everything by default. Why do you want gtk2?

@dtzWill
Copy link
Member Author

dtzWill commented Dec 14, 2017

@orivej okay, sounds good to me! Certainly makes things quite a bit simpler :).

I wanted gtk2 for my own purposes -- but if that's the only "option" left... I don't think it's worth bothering with in nixpkgs proper.

I'll update the PR shortly :).

@dtzWill dtzWill changed the title pqiv: add (optional) support for various backends pqiv: add dependencies needed to enable all backends Dec 14, 2017
@orivej
Copy link
Contributor

orivej commented Dec 14, 2017

Do you think other users may benefit from the gtk2 version? If so and you want it supported, we should create a pqiv-gtk2 override in all-packages.nix.

@dtzWill
Copy link
Member Author

dtzWill commented Dec 15, 2017

No, it's just because my research project doesn't fully support gtk3 yet O:). If anyone comes around asking for it later we can add it at that point. Thanks though!

@orivej orivej merged commit 28f49e8 into NixOS:master Dec 15, 2017
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