about summary refs log tree commit diff
path: root/pkgs/tools/misc/partition-manager
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2022-05-30 03:31:17 +0200
committerKlemens Nanni <klemens@posteo.de>2022-05-30 11:52:08 +0200
commit475b2f1244020e51e6521f208d55072fdc95a272 (patch)
tree46ad7822374cfb5410ad990b2f20994211e135fa /pkgs/tools/misc/partition-manager
parent558da46289a8fc302a5fd7b1fac2467aadd1b132 (diff)
partitionmanager: Wrap once
Merge both the GNOME and manual runtime `PATH` fixups into the automatic
Qt hook to end up with one wrapper containing all deduplicated variables
rather than three doing duplicate work and messing up `argv[0]`.
Diffstat (limited to 'pkgs/tools/misc/partition-manager')
-rw-r--r--pkgs/tools/misc/partition-manager/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix
index c1abe01be5659..851179c8d8749 100644
--- a/pkgs/tools/misc/partition-manager/default.nix
+++ b/pkgs/tools/misc/partition-manager/default.nix
@@ -1,5 +1,5 @@
-{ mkDerivation, fetchurl, lib, makeWrapper
-, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
+{ mkDerivation, fetchurl, lib
+, extra-cmake-modules, kdoctools, wrapGAppsHook
 , kconfig, kcrash, kinit, kpmcore, polkit-qt
 , cryptsetup, lvm2, mdadm, smartmontools, systemdMinimal, util-linux
 , btrfs-progs, dosfstools, e2fsprogs, exfat, f2fs-tools, fatresize, hfsprogs
@@ -48,13 +48,16 @@ in mkDerivation rec {
     hash = "sha256-eChn3OkdLHC9pedDBBwszTeTj2l7ky2W79INqvjrkBo=";
   };
 
-  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook makeWrapper ];
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
 
   propagatedBuildInputs = [ kconfig kcrash kinit kpmcore polkit-qt ];
 
-  postFixup = ''
-    wrapProgram $out/bin/partitionmanager \
+  dontWrapGApps = true;
+  preFixup = ''
+    qtWrapperArgs+=(
+      "''${gappsWrapperArgs[@]}"
       --prefix PATH : "${runtimeDeps}"
+    )
   '';
 
   meta = with lib; {