2008-07-28 18:25:09 +02:00
|
|
|
{stdenv, browser, browserName ? "firefox", nameSuffix ? "", makeWrapper, plugins}:
|
2004-10-17 15:28:28 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-07-28 18:25:09 +02:00
|
|
|
name = browser.name + "-with-plugins";
|
2004-10-17 15:28:28 +02:00
|
|
|
|
2008-06-14 23:42:07 +02:00
|
|
|
buildInputs = [makeWrapper];
|
2004-10-17 15:28:28 +02:00
|
|
|
|
2008-06-14 23:42:07 +02:00
|
|
|
buildCommand = ''
|
2008-07-28 18:25:09 +02:00
|
|
|
if [ ! -x "${browser}/bin/${browserName}" ]
|
|
|
|
then
|
|
|
|
echo "cannot find executable file \`${browser}/bin/${browserName}'"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
makeWrapper "${browser}/bin/${browserName}" \
|
|
|
|
"$out/bin/${browserName}${nameSuffix}" \
|
2008-06-14 23:42:07 +02:00
|
|
|
--suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
|
|
|
|
--suffix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))"
|
|
|
|
'';
|
2007-11-24 11:49:52 +01:00
|
|
|
|
2005-02-16 12:24:40 +01:00
|
|
|
# Let each plugin tell us (through its `mozillaPlugin') attribute
|
|
|
|
# where to find the plugin in its tree.
|
2006-08-09 17:05:30 +02:00
|
|
|
plugins = map (x: x + x.mozillaPlugin) plugins;
|
2006-03-10 17:12:46 +01:00
|
|
|
|
|
|
|
meta = {
|
2006-10-12 12:53:16 +02:00
|
|
|
description =
|
2008-07-28 18:25:09 +02:00
|
|
|
browser.meta.description
|
2006-10-12 12:53:16 +02:00
|
|
|
+ " (with plugins: "
|
|
|
|
+ (let lib = import ../../../../lib;
|
|
|
|
in lib.concatStrings (lib.intersperse ", " (map (x: x.name) plugins)))
|
|
|
|
+ ")";
|
2006-03-10 17:12:46 +01:00
|
|
|
};
|
2004-10-17 15:28:28 +02:00
|
|
|
}
|