12 # Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH
13 wrapBinary = writeText "wrapBinary" ''
14 source ${buildPackages.makeWrapper}/nix-support/setup-hook
17 cd -- "$(dirname "$p")"
18 binary=$(basename --suffix=.dsp "$p")
19 rm -f .$binary-wrapped
20 wrapProgram $binary --set QT_PLUGIN_PATH "${qtbase}/${qtbase.qtPluginPrefix}"
21 sed -i $binary -e 's@exec@cd "$(dirname "$(readlink -f "''${BASH_SOURCE[0]}")")" \&\& exec@g'
26 faust.wrapWithBuildEnv {
28 baseName = "faust2jaqt";
35 propagatedBuildInputs = [
43 dontWrapQtApps = true;
46 for script in "$out"/bin/*; do
47 # append the wrapping code to the compilation script
48 cat ${wrapBinary} >> $script
49 # prevent the qmake error when running the script
50 sed -i "/QMAKE=/c\ QMAKE="${qtbase.dev}/bin/qmake"" $script