mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
pidgin-with-plugins: use symlinkJoin
This commit is contained in:
parent
c1e9ea6c86
commit
1f89dbd46b
1 changed files with 6 additions and 13 deletions
|
@ -1,24 +1,17 @@
|
|||
{ stdenv, buildEnv, pidgin, makeWrapper, plugins }:
|
||||
{ stdenv, symlinkJoin, pidgin, makeWrapper, plugins }:
|
||||
|
||||
let
|
||||
extraArgs = map (x: x.wrapArgs or "") plugins;
|
||||
drv = buildEnv {
|
||||
name = "pidgin-with-plugins-" + (builtins.parseDrvName pidgin.name).version;
|
||||
in symlinkJoin {
|
||||
name = "pidgin-with-plugins-${pidgin.version}";
|
||||
|
||||
paths = [ pidgin ] ++ plugins;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
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" \
|
||||
${toString extraArgs}
|
||||
'';
|
||||
};
|
||||
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue