NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14k forks source link

What is the difference between wrapped and unwrapped packages? (Firefox e.g.) #27164

Closed jarry9 closed 5 years ago

jarry9 commented 7 years ago

Hi,

I check the docs bu I could not found anything about this...

hat is the difference between unwrapped and pure (normal) package of the same application. For example Firefox has 2 same package to install:

pkgs/applications/networking/browsers/firefox/wrapper.nix pkgs/applications/networking/browsers/firefox/packages.nix

Thank you

magnetophon commented 7 years ago

@jarry9 Hi,

I may be misunderstanding the question, but here goes anyway: Have you looked at the content of wrapped packages? They are scripts that call the unwrapped package after setting some environment variables.

I hope that answers your question.

jarry9 commented 7 years ago

@magnetophon maybe I asked it wrong..

The output of command is below: nix-env -qaP | grep firefox

nixpkgs.esteidfirefoxplugin esteidfirefoxplugin-3.12.1.1142 nixpkgs.faust2firefox faust2firefox-2.1.0 nixpkgs.firefox-esr firefox-52.2.0esr nixpkgs.firefox-esr-wrapper firefox-52.2.0esr nixpkgs.firefox firefox-54.0 nixpkgs.firefox-wrapper firefox-54.0 nixpkgs.firefoxWrapper firefox-54.0 nixpkgs.firefox-esr-unwrapped firefox-esr-unwrapped-52.2.0esr nixpkgs.firefox-unwrapped firefox-unwrapped-54.0 nixpkgs.firefoxPackages.tor-browser tor-browser-unwrapped-6.5.2

All these lines are package ID's. So I can install any of them one by one. But I could not understand what is exactly "unwrapped", "wrapper" keywords..

Thank you

avnik commented 7 years ago

Wrapped packages (usually named like somethingWithPlugins) have environmet variables added, and/or plugins populated into proper dirs via symlinking)

For example gimpWithPlugins does wrapProgram $out/bin/$each --set GIMP2_PLUGINDIR "$out/lib/gimp/2.0", where $out have all selected plugins blended-in.

oxij commented 7 years ago

firefox-*-unwrapped is just a pure firefox browser.

Wrapper adds a desktop icon. Also it can add an Adobe Flash plugin and many other codecs and gstreamer plugins (including gst-plugins-bad and -ugly which is probably bad for security) if you ask for them with options.

$ nix-instantiate --eval --strict -A "firefox.meta.description" "A web browser built from Firefox source tree (with plugins: )"

joachifm commented 5 years ago

I believe this question has been answered.