bitwig-studio: suffix LD_LIBRARY_PATH

NixOS's `services.pipewire.jack` and `pw-jack` set `LD_LIBRARY_PATH`, we
need to ensure those binaries are prioritized
This commit is contained in:
Thomas Churchman 2021-06-16 09:08:28 +01:00
parent 593f8bde3c
commit a027daf2bd

View file

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
ldLibraryPath = lib.strings.makeLibraryPath buildInputs; ldLibraryPath = lib.strings.makeLibraryPath buildInputs;
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/bin mkdir -p $out/bin
cp -r opt/bitwig-studio $out/libexec cp -r opt/bitwig-studio $out/libexec
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
@ -41,6 +43,8 @@ stdenv.mkDerivation rec {
substitute usr/share/applications/bitwig-studio.desktop \ substitute usr/share/applications/bitwig-studio.desktop \
$out/share/applications/bitwig-studio.desktop \ $out/share/applications/bitwig-studio.desktop \
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
runHook postInstall
''; '';
postFixup = '' postFixup = ''
@ -57,7 +61,7 @@ stdenv.mkDerivation rec {
wrapProgram $f \ wrapProgram $f \
"''${gappsWrapperArgs[@]}" \ "''${gappsWrapperArgs[@]}" \
--prefix PATH : "${binPath}" \ --prefix PATH : "${binPath}" \
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}" --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
done done
''; '';