faba06ce54
LD_LIBRARY_PATH elements, since they can use patchelf --rpath if necessary. * Flashplayer / JRE: do just that. * JRE: libstdcpp5 no longer seems to be necessary for the plugin. svn path=/nixpkgs/trunk/; revision=12094
27 lines
795 B
Nix
27 lines
795 B
Nix
{stdenv, firefox, nameSuffix ? "", makeWrapper, plugins}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = firefox.name + "-with-plugins";
|
|
|
|
buildInputs = [makeWrapper];
|
|
|
|
buildCommand = ''
|
|
makeWrapper "${firefox}/bin/firefox" "$out/bin/firefox${nameSuffix}" \
|
|
--suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
|
|
--suffix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))"
|
|
'';
|
|
|
|
# Let each plugin tell us (through its `mozillaPlugin') attribute
|
|
# where to find the plugin in its tree.
|
|
plugins = map (x: x + x.mozillaPlugin) plugins;
|
|
|
|
meta = {
|
|
description =
|
|
firefox.meta.description
|
|
+ " (with plugins: "
|
|
+ (let lib = import ../../../../lib;
|
|
in lib.concatStrings (lib.intersperse ", " (map (x: x.name) plugins)))
|
|
+ ")";
|
|
};
|
|
}
|