From 41b6a178260ad1fe627c0a9faf795920b4dd68dc Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 26 Apr 2016 15:26:23 +0300 Subject: [PATCH] puredata-with-plugins: use symlinkJoin --- pkgs/applications/audio/puredata/wrapper.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/audio/puredata/wrapper.nix b/pkgs/applications/audio/puredata/wrapper.nix index 0a30037b2268..9c0a48db51cc 100644 --- a/pkgs/applications/audio/puredata/wrapper.nix +++ b/pkgs/applications/audio/puredata/wrapper.nix @@ -1,23 +1,16 @@ -{ stdenv, buildEnv, puredata, makeWrapper, plugins }: +{ stdenv, symlinkJoin, puredata, makeWrapper, plugins }: let puredataFlags = map (x: "-path ${x}/") plugins; -drv = buildEnv { - name = "puredata-with-plugins-" + (builtins.parseDrvName puredata.name).version; +in symlinkJoin { + name = "puredata-with-plugins-${puredata.version}"; paths = [ puredata ] ++ 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 ${puredata}/bin/*; do - ln -s $i $out/bin - done - fi wrapProgram $out/bin/pd \ --add-flags "${toString puredataFlags}" ''; - }; -in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; }) +}