Commit b88bb726 authored by guylamar2006's avatar guylamar2006 Committed by Sigmanificient
Browse files

various: switch from --replace to --replace-fail

- ran nix-build -A package --check on packages
- fix bad DesktopItems paths after switching to replace-fail in Bitwig
Studio 4 and 5
- future proof --replace-fail calls
- Make substitution less broad in Bitwig Studio 4 and 5
parent 42544f3a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -108,8 +108,8 @@ stdenv.mkDerivation rec {
    sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
    patchShebangs ./tools/
    substituteInPlace libs/ardour/video_tools_paths.cc \
      --replace 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
      --replace 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
      --replace-fail 'ffmpeg_exe = X_("")' "ffmpeg_exe = X_(\"${lib.getExe ffmpeg}\");" \
      --replace-fail 'ffprobe_exe = X_("");' "ffprobe_exe = X_(\"${lib.getExe' ffmpeg "ffprobe"}\");"
  '';

  nativeBuildInputs = [
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
    cp -r usr/share $out/share
    substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
      $out/share/applications/com.bitwig.BitwigStudio.desktop \
      --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
      --replace-fail "Exec=bitwig-studio" "Exec=$out/bin/bitwig-studio"

      runHook postInstall
  '';
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ stdenv.mkDerivation rec {

    substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
      $out/share/applications/com.bitwig.BitwigStudio.desktop \
      --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
      --replace-fail "Exec=bitwig-studio" "Exec=$out/bin/bitwig-studio"

      runHook postInstall
  '';
+2 −2
Original line number Diff line number Diff line
@@ -75,13 +75,13 @@ stdenv.mkDerivation (finalAttrs: {
    # --with-appname="$0" is evaluated with $0=.carla-wrapped instead of carla. Fix that.
    for file in $(grep -rl -- '--with-appname="$0"'); do
        filename="$(basename -- "$file")"
        substituteInPlace "$file" --replace '--with-appname="$0"' "--with-appname=\"$filename\""
        substituteInPlace "$file" --replace-fail '--with-appname="$0"' "--with-appname=\"$filename\""
    done
  ''
  + lib.optionalString withGtk2 ''
    # Will try to dlopen() libgtk-x11-2.0 at runtime when using the bridge.
    substituteInPlace source/bridges-ui/Makefile \
        --replace '$(CXX) $(OBJS_GTK2)' '$(CXX) $(OBJS_GTK2) -lgtk-x11-2.0'
        --replace-fail '$(CXX) $(OBJS_GTK2)' '$(CXX) $(OBJS_GTK2) -lgtk-x11-2.0'
  '';

  dontWrapQtApps = true;
+2 −2
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ stdenv.mkDerivation rec {

  postFixup = ''
    substituteInPlace "$out"/lib/pkgconfig/codecserver.pc \
      --replace '=''${prefix}//' '=/' \
      --replace '=''${exec_prefix}//' '=/'
      --replace-fail '=''${prefix}//' '=/' \
      --replace-fail '=''${exec_prefix}//' '=/'
  '';

  meta = with lib; {
Loading