wpsoffice: apply Qt and GTK wrappers

Based on the work of Ninlives.
This commit is contained in:
Dmitry Kalinkin 2020-04-14 02:18:27 -04:00
parent 593fd37ce6
commit 6daab9b9ff

View File

@ -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
'';
}