about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
blob: a2885d7194f4b15820b5ec6b3960a7d8af4bf9af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, symlinkJoin, pidgin, makeWrapper, plugins }:

let
extraArgs = map (x: x.wrapArgs or "") plugins;
in symlinkJoin {
  name = "pidgin-with-plugins-${pidgin.version}";

  paths = [ pidgin ] ++ plugins;

  nativeBuildInputs = [ makeWrapper ];

  postBuild = ''
    wrapProgram $out/bin/pidgin \
      --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${lib.versions.major pidgin.version} $out/lib/pidgin" \
      ${toString extraArgs}
    wrapProgram $out/bin/finch \
      --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${lib.versions.major pidgin.version}" \
      ${toString extraArgs}
  '';
}