about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2023-12-25 14:18:20 +0200
committerDoron Behar <doron.behar@gmail.com>2023-12-25 14:58:15 +0200
commit3a546238f47d8979aa3071d59d17b1305323c354 (patch)
treea59485ba04c070f3274da06b23609be9c53bedd5 /pkgs/misc
parent78d486bc1aba1a6b1cb87aa76ab25fc38edda2bd (diff)
hplip: don't double wrap with qt env
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/drivers/hplip/default.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index 854c0c39fa15d..577cb3ecf8e33 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -239,6 +239,8 @@ python3Packages.buildPythonApplication {
   # 1. Calling patchPythonProgram on the original script in $out/share/hplip
   # 2. Making our own wrapper pointing directly to the original script.
   dontWrapPythonPrograms = true;
+  # We also avoid double wrapping in case we add qt5 support
+  dontWrapQtApps = true;
   preFixup = ''
     buildPythonPath "$out $pythonPath"
 
@@ -248,7 +250,7 @@ python3Packages.buildPythonApplication {
       echo "patching \`$py'..."
       patchPythonScript "$py"
       echo "wrapping \`$bin'..."
-      makeWrapper "$py" "$bin" \
+      ${if withQt5 then "makeQtWrapper" else "makeWrapper"} "$py" "$bin" \
           --prefix PATH ':' "$program_PATH" \
           --set PYTHONNOUSERSITE "true" \
           $makeWrapperArgs
@@ -266,10 +268,6 @@ python3Packages.buildPythonApplication {
       --replace {,${util-linux}/bin/}logger \
       --replace {/usr,$out}/bin
     remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so)
-  '' + lib.optionalString withQt5 ''
-    for f in $out/bin/hp-*;do
-      wrapQtApp $f
-    done
   '';
 
   # There are some binaries there, which reference gcc-unwrapped otherwise.