2014-10-18 08:22:37 +00:00
|
|
|
{ stdenv, buildEnv, pidgin, makeWrapper, plugins }:
|
|
|
|
|
2014-11-02 01:19:39 +00:00
|
|
|
let
|
|
|
|
extraArgs = map (x: x.wrapArgs or "") plugins;
|
|
|
|
drv = buildEnv {
|
2014-10-26 10:34:05 +00:00
|
|
|
name = "pidgin-with-plugins-" + (builtins.parseDrvName pidgin.name).version;
|
2014-10-18 08:22:37 +00:00
|
|
|
|
|
|
|
paths = [ pidgin ] ++ plugins;
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# TODO: This could be avoided if buildEnv could be forced to create all directories
|
|
|
|
if [ -L $out/bin ]; then
|
|
|
|
rm $out/bin
|
|
|
|
mkdir $out/bin
|
|
|
|
for i in ${pidgin}/bin/*; do
|
|
|
|
ln -s $i $out/bin
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
wrapProgram $out/bin/pidgin \
|
2014-11-16 19:42:19 +00:00
|
|
|
--suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.majorVersion} $out/lib/pidgin" \
|
2014-11-02 01:19:39 +00:00
|
|
|
${toString extraArgs}
|
2014-10-18 08:22:37 +00:00
|
|
|
'';
|
|
|
|
};
|
2014-10-26 10:34:05 +00:00
|
|
|
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|