From 475b2f1244020e51e6521f208d55072fdc95a272 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Mon, 30 May 2022 03:31:17 +0200 Subject: [PATCH] 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]`. --- pkgs/tools/misc/partition-manager/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix index c1abe01be565..851179c8d874 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; {