From 4fa859c5f1e5346870954e455afa52fc591fd5c5 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 8 Jun 2023 17:55:47 -0700 Subject: [PATCH] patchance: Fix issues with qt not being patched (see #236762) Fixes #228223 Co-authored-by: Tobias Bora --- pkgs/applications/audio/patchance/default.nix | 14 +++++++++++--- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/patchance/default.nix b/pkgs/applications/audio/patchance/default.nix index 99e622bcf70c..25899f34b9f6 100644 --- a/pkgs/applications/audio/patchance/default.nix +++ b/pkgs/applications/audio/patchance/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildPythonApplication, libjack2, pyqt5, qttools, which }: +{ lib, fetchurl, buildPythonApplication, libjack2, pyqt5, qt5, which, bash }: buildPythonApplication rec { pname = "patchance"; @@ -13,10 +13,11 @@ buildPythonApplication rec { nativeBuildInputs = [ pyqt5 # pyuic5 and pyrcc5 to build resources. - qttools # lrelease to build translations. + qt5.qttools # lrelease to build translations. which # which to find lrelease. + qt5.wrapQtAppsHook ]; - buildInputs = [ libjack2 ]; + buildInputs = [ libjack2 bash ]; propagatedBuildInputs = [ pyqt5 ]; dontWrapQtApps = true; # The program is a python script. @@ -27,8 +28,15 @@ buildPythonApplication rec { "--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ libjack2 ]) ]; + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + postFixup = '' wrapPythonProgramsIn "$out/share/patchance/src" "$out $pythonPath" + for file in $out/bin/*; do + wrapQtApp "$file" + done ''; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 77f0edd41542..1d020dce849c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11817,9 +11817,7 @@ with pkgs; patchage = callPackage ../applications/audio/patchage { }; - patchance = python3Packages.callPackage ../applications/audio/patchance { - inherit (qt5) qttools; - }; + patchance = python3Packages.callPackage ../applications/audio/patchance { }; patatt = callPackage ../development/tools/patatt { };