about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/carla/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/carla/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/audio/carla/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/carla/default.nix b/nixpkgs/pkgs/applications/audio/carla/default.nix
index af43e40e2c13..2efd4c671841 100644
--- a/nixpkgs/pkgs/applications/audio/carla/default.nix
+++ b/nixpkgs/pkgs/applications/audio/carla/default.nix
@@ -44,6 +44,14 @@ stdenv.mkDerivation rec {
 
   installFlags = [ "PREFIX=$(out)" ];
 
+  postPatch = ''
+    # --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\""
+    done
+  '';
+
   dontWrapQtApps = true;
   postFixup = ''
     # Also sets program_PYTHONPATH and program_PATH variables