faust: replace qt4 with qt5

This commit is contained in:
Bart Brouns 2023-04-03 16:04:07 +02:00
parent e40b5250ab
commit d58c684ecf
4 changed files with 69 additions and 12 deletions

View File

@ -1,15 +1,41 @@
{ faust
, alsa-lib
, qt4
, qtbase
, writeText
, makeWrapper
}:
let
# Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH
wrapBinary = writeText "wrapBinary" ''
source ${makeWrapper}/nix-support/setup-hook
for p in $FILES; do
workpath=$PWD
cd -- "$(dirname "$p")"
binary=$(basename --suffix=.dsp "$p")
rm -f .$binary-wrapped
wrapProgram $binary --set QT_PLUGIN_PATH "${qtbase}/${qtbase.qtPluginPrefix}"
sed -i $binary -e 's@exec@cd "$(dirname "$(readlink -f "''${BASH_SOURCE[0]}")")" \&\& exec@g'
cd $workpath
done
'';
in
faust.wrapWithBuildEnv {
baseName = "faust2alqt";
propagatedBuildInputs = [
alsa-lib
qt4
qtbase
];
dontWrapQtApps = true;
preFixup = ''
for script in "$out"/bin/*; do
# append the wrapping code to the compilation script
cat ${wrapBinary} >> $script
# prevent the qmake error when running the script
sed -i "/QMAKE=/c\ QMAKE="${qtbase.dev}/bin/qmake"" $script
done
'';
}

View File

@ -1,11 +1,27 @@
{ faust
, jack2
, qt4
, qtbase
, libsndfile
, alsa-lib
, writeText
, makeWrapper
, which
}:
let
# Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH
wrapBinary = writeText "wrapBinary" ''
source ${makeWrapper}/nix-support/setup-hook
for p in $FILES; do
workpath=$PWD
cd -- "$(dirname "$p")"
binary=$(basename --suffix=.dsp "$p")
rm -f .$binary-wrapped
wrapProgram $binary --set QT_PLUGIN_PATH "${qtbase}/${qtbase.qtPluginPrefix}"
sed -i $binary -e 's@exec@cd "$(dirname "$(readlink -f "''${BASH_SOURCE[0]}")")" \&\& exec@g'
cd $workpath
done
'';
in
faust.wrapWithBuildEnv {
baseName = "faust2jaqt";
@ -17,10 +33,21 @@ faust.wrapWithBuildEnv {
propagatedBuildInputs = [
jack2
qt4
qtbase
libsndfile
alsa-lib
which
];
dontWrapQtApps = true;
preFixup = ''
for script in "$out"/bin/*; do
# append the wrapping code to the compilation script
cat ${wrapBinary} >> $script
# prevent the qmake error when running the script
sed -i "/QMAKE=/c\ QMAKE="${qtbase.dev}/bin/qmake"" $script
done
'';
}

View File

@ -1,15 +1,19 @@
{ boost
, faust
, lv2
, qt4
, qtbase
, which
}:
faust.wrapWithBuildEnv {
baseName = "faust2lv2";
propagatedBuildInputs = [ boost lv2 qt4 which ];
propagatedBuildInputs = [ boost lv2 qtbase ];
dontWrapQtApps = true;
preFixup = ''
sed -i "/QMAKE=/c\ QMAKE="${qtbase.dev}/bin/qmake"" "$out"/bin/faust2lv2;
'';
}

View File

@ -37850,7 +37850,7 @@ with pkgs;
faust2 = callPackage ../applications/audio/faust/faust2.nix { };
faust2alqt = callPackage ../applications/audio/faust/faust2alqt.nix { };
faust2alqt = libsForQt5.callPackage ../applications/audio/faust/faust2alqt.nix { };
faust2alsa = callPackage ../applications/audio/faust/faust2alsa.nix { };
@ -37862,11 +37862,11 @@ with pkgs;
faust2jackrust = callPackage ../applications/audio/faust/faust2jackrust.nix { };
faust2jaqt = callPackage ../applications/audio/faust/faust2jaqt.nix { };
faust2jaqt = libsForQt5.callPackage ../applications/audio/faust/faust2jaqt.nix { };
faust2ladspa = callPackage ../applications/audio/faust/faust2ladspa.nix { };
faust2lv2 = callPackage ../applications/audio/faust/faust2lv2.nix { };
faust2lv2 = libsForQt5.callPackage ../applications/audio/faust/faust2lv2.nix { };
faustlive = callPackage ../applications/audio/faust/faustlive.nix { };