wpsoffice: 10.1.0.5672 -> 11.1.0.8865 (#74769)
This commit is contained in:
parent
e678aadb04
commit
9974c07915
@ -7664,6 +7664,12 @@
|
||||
githubId = 50867187;
|
||||
name = "Rakesh Gupta";
|
||||
};
|
||||
mlatus = {
|
||||
email = "wqseleven@gmail.com";
|
||||
github = "Ninlives";
|
||||
githubId = 17873203;
|
||||
name = "mlatus";
|
||||
};
|
||||
waiting-for-dev = {
|
||||
email = "marc@lamarciana.com";
|
||||
github = "waiting-for-dev";
|
||||
|
@ -1,23 +1,22 @@
|
||||
{ stdenv, fetchurl
|
||||
, libX11, glib, xorg, fontconfig, freetype
|
||||
, zlib, libpng12, libICE, libXrender, cups }:
|
||||
, zlib, libpng12, libICE, libXrender, cups
|
||||
, alsaLib, atk, cairo, dbus, expat
|
||||
, gdk-pixbuf, gtk2-x11, lzma, pango, zotero
|
||||
, sqlite, libuuid, qt5, dpkg }:
|
||||
|
||||
let
|
||||
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
|
||||
else "x86";
|
||||
|
||||
version = "10.1.0.5672";
|
||||
in stdenv.mkDerivation rec{
|
||||
stdenv.mkDerivation rec{
|
||||
pname = "wpsoffice";
|
||||
inherit version;
|
||||
version = "11.1.0.8865";
|
||||
|
||||
src = fetchurl {
|
||||
name = "${pname}-${version}.tar.xz";
|
||||
url = "http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office_${version}~a21_${bits}.tar.xz";
|
||||
sha256 = if bits == "x86_64" then
|
||||
"0mi3n9kplf82gd0g2m0np957agy53p4g1qh81pbban49r4n0ajcz" else
|
||||
"1dk400ap5qwdhjvn8lnk602f5akayr391fkljxdkrpn5xac01m97";
|
||||
url = "https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb";
|
||||
sha256 = "0pxx3j02cm8d08iakg30azjvl3a50y4avyrf08ddgaavqnvkypfj";
|
||||
};
|
||||
unpackCmd = "dpkg -x $src .";
|
||||
sourceRoot = ".";
|
||||
|
||||
nativeBuildInputs = [ qt5.wrapQtAppsHook dpkg ];
|
||||
|
||||
meta = {
|
||||
description = "Office program originally named Kingsoft Office";
|
||||
@ -25,20 +24,44 @@ in stdenv.mkDerivation rec{
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
hydraPlatforms = [];
|
||||
license = stdenv.lib.licenses.unfreeRedistributable;
|
||||
maintainers = [ stdenv.lib.maintainers.mlatus ];
|
||||
};
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [
|
||||
libPath = with xorg; stdenv.lib.makeLibraryPath [
|
||||
libX11
|
||||
libpng12
|
||||
glib
|
||||
xorg.libSM
|
||||
xorg.libXext
|
||||
libSM
|
||||
libXext
|
||||
fontconfig
|
||||
zlib
|
||||
freetype
|
||||
libICE
|
||||
cups
|
||||
libXrender
|
||||
libxcb
|
||||
|
||||
alsaLib
|
||||
atk
|
||||
cairo
|
||||
dbus.daemon.lib
|
||||
expat
|
||||
fontconfig.lib
|
||||
gdk-pixbuf
|
||||
gtk2-x11
|
||||
lzma
|
||||
pango
|
||||
zotero
|
||||
sqlite
|
||||
libuuid
|
||||
libXcomposite
|
||||
libXcursor
|
||||
libXdamage
|
||||
libXfixes
|
||||
libXi
|
||||
libXrandr
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
];
|
||||
|
||||
dontPatchELF = true;
|
||||
@ -49,32 +72,27 @@ in stdenv.mkDerivation rec{
|
||||
|
||||
installPhase = ''
|
||||
prefix=$out/opt/kingsoft/wps-office
|
||||
mkdir -p $prefix
|
||||
cp -r . $prefix
|
||||
mkdir -p $out
|
||||
cp -r opt $out
|
||||
cp -r usr/* $out
|
||||
|
||||
# Avoid forbidden reference error due use of patchelf
|
||||
rm -r $PWD
|
||||
rm -r *
|
||||
|
||||
mkdir $out/bin
|
||||
for i in wps wpp et; do
|
||||
for i in wps wpp et wpspdf; do
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--force-rpath --set-rpath "$prefix/office6:$libPath" \
|
||||
--force-rpath --set-rpath "$(patchelf --print-rpath $prefix/office6/$i):${stdenv.cc.cc.lib}/lib64:${libPath}" \
|
||||
$prefix/office6/$i
|
||||
|
||||
substitute $prefix/$i $out/bin/$i \
|
||||
substituteInPlace $out/bin/$i \
|
||||
--replace /opt/kingsoft/wps-office $prefix
|
||||
chmod +x $out/bin/$i
|
||||
|
||||
substituteInPlace $prefix/resource/applications/wps-office-$i.desktop \
|
||||
--replace /usr/bin $out/bin
|
||||
done
|
||||
|
||||
# China fonts
|
||||
mkdir -p $prefix/resource/fonts/wps-office $out/etc/fonts/conf.d
|
||||
ln -s $prefix/fonts/* $prefix/resource/fonts/wps-office
|
||||
ln -s $prefix/fontconfig/*.conf $out/etc/fonts/conf.d
|
||||
|
||||
ln -s $prefix/resource $out/share
|
||||
for i in $out/share/applications/*;do
|
||||
substituteInPlace $i \
|
||||
--replace /usr/bin $out/bin \
|
||||
--replace /opt/kingsoft/wps-office $prefix
|
||||
done
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user