diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix index 497897a9a022..76ecdcb8abb8 100644 --- a/pkgs/applications/office/wpsoffice/default.nix +++ b/pkgs/applications/office/wpsoffice/default.nix @@ -3,6 +3,7 @@ , fetchurl , autoPatchelfHook , dpkg +, wrapGAppsHook , wrapQtAppsHook , alsaLib , atk @@ -52,7 +53,7 @@ stdenv.mkDerivation rec{ rm opt/kingsoft/wps-office/office6/{libjsetapi.so,libjswppapi.so,libjswpsapi.so} ''; - nativeBuildInputs = [ autoPatchelfHook dpkg wrapQtAppsHook ]; + nativeBuildInputs = [ autoPatchelfHook dpkg wrapGAppsHook wrapQtAppsHook ]; meta = { description = "Office program originally named Kingsoft Office"; @@ -154,4 +155,20 @@ stdenv.mkDerivation rec{ --replace /opt/kingsoft/wps-office $prefix done ''; + + runtimeLibPath = stdenv.lib.makeLibraryPath [ + cups.lib + ]; + + dontWrapQtApps = true; + dontWrapGApps = true; + postFixup = '' + for f in "$out"/bin/*; do + echo "Wrapping $f" + wrapProgram "$f" \ + "''${gappsWrapperArgs[@]}" \ + "''${qtWrapperArgs[@]}" \ + --suffix LD_LIBRARY_PATH : "$runtimeLibPath" + done + ''; }