nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
Bjørn Forsman 71d4380a41 pidgin-with-plugins: fix version number placement in pkg name
Currently the pidgin plugins wrapper is named
"pidgin-VERSION-with-plugins". Fix it so that it becomes
"pidgin-with-plugins-VERSION".

(And add missing newline at the end of file.)
2014-10-26 11:51:09 +01:00

22 lines
680 B
Nix

{ stdenv, buildEnv, pidgin, makeWrapper, plugins }:
let drv = buildEnv {
name = "pidgin-with-plugins-" + (builtins.parseDrvName pidgin.name).version;
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 \
--suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.majorVersion} $out/lib/pidgin"
'';
};
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })