From 1f89dbd46b9aa6c8ca3877e2fb4463dd61cf217b Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 26 Apr 2016 15:27:17 +0300 Subject: [PATCH] pidgin-with-plugins: use symlinkJoin --- .../instant-messengers/pidgin/wrapper.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix index 7e637c767cf..cff0f0818ee 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix @@ -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 ]; }) +}