mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 06:31:20 +00:00
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;
|
githubId = 50867187;
|
||||||
name = "Rakesh Gupta";
|
name = "Rakesh Gupta";
|
||||||
};
|
};
|
||||||
|
mlatus = {
|
||||||
|
email = "wqseleven@gmail.com";
|
||||||
|
github = "Ninlives";
|
||||||
|
githubId = 17873203;
|
||||||
|
name = "mlatus";
|
||||||
|
};
|
||||||
waiting-for-dev = {
|
waiting-for-dev = {
|
||||||
email = "marc@lamarciana.com";
|
email = "marc@lamarciana.com";
|
||||||
github = "waiting-for-dev";
|
github = "waiting-for-dev";
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl
|
||||||
, libX11, glib, xorg, fontconfig, freetype
|
, 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
|
stdenv.mkDerivation rec{
|
||||||
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
|
|
||||||
else "x86";
|
|
||||||
|
|
||||||
version = "10.1.0.5672";
|
|
||||||
in stdenv.mkDerivation rec{
|
|
||||||
pname = "wpsoffice";
|
pname = "wpsoffice";
|
||||||
inherit version;
|
version = "11.1.0.8865";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
name = "${pname}-${version}.tar.xz";
|
url = "https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb";
|
||||||
url = "http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office_${version}~a21_${bits}.tar.xz";
|
sha256 = "0pxx3j02cm8d08iakg30azjvl3a50y4avyrf08ddgaavqnvkypfj";
|
||||||
sha256 = if bits == "x86_64" then
|
|
||||||
"0mi3n9kplf82gd0g2m0np957agy53p4g1qh81pbban49r4n0ajcz" else
|
|
||||||
"1dk400ap5qwdhjvn8lnk602f5akayr391fkljxdkrpn5xac01m97";
|
|
||||||
};
|
};
|
||||||
|
unpackCmd = "dpkg -x $src .";
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ qt5.wrapQtAppsHook dpkg ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Office program originally named Kingsoft Office";
|
description = "Office program originally named Kingsoft Office";
|
||||||
@ -25,20 +24,44 @@ in stdenv.mkDerivation rec{
|
|||||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||||
hydraPlatforms = [];
|
hydraPlatforms = [];
|
||||||
license = stdenv.lib.licenses.unfreeRedistributable;
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.mlatus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
libPath = stdenv.lib.makeLibraryPath [
|
libPath = with xorg; stdenv.lib.makeLibraryPath [
|
||||||
libX11
|
libX11
|
||||||
libpng12
|
libpng12
|
||||||
glib
|
glib
|
||||||
xorg.libSM
|
libSM
|
||||||
xorg.libXext
|
libXext
|
||||||
fontconfig
|
fontconfig
|
||||||
zlib
|
zlib
|
||||||
freetype
|
freetype
|
||||||
libICE
|
libICE
|
||||||
cups
|
cups
|
||||||
libXrender
|
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;
|
dontPatchELF = true;
|
||||||
@ -49,32 +72,27 @@ in stdenv.mkDerivation rec{
|
|||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
prefix=$out/opt/kingsoft/wps-office
|
prefix=$out/opt/kingsoft/wps-office
|
||||||
mkdir -p $prefix
|
mkdir -p $out
|
||||||
cp -r . $prefix
|
cp -r opt $out
|
||||||
|
cp -r usr/* $out
|
||||||
|
|
||||||
# Avoid forbidden reference error due use of patchelf
|
# Avoid forbidden reference error due use of patchelf
|
||||||
rm -r $PWD
|
rm -r *
|
||||||
|
|
||||||
mkdir $out/bin
|
for i in wps wpp et wpspdf; do
|
||||||
for i in wps wpp et; do
|
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
--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
|
$prefix/office6/$i
|
||||||
|
|
||||||
substitute $prefix/$i $out/bin/$i \
|
substituteInPlace $out/bin/$i \
|
||||||
--replace /opt/kingsoft/wps-office $prefix
|
--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
|
done
|
||||||
|
|
||||||
# China fonts
|
for i in $out/share/applications/*;do
|
||||||
mkdir -p $prefix/resource/fonts/wps-office $out/etc/fonts/conf.d
|
substituteInPlace $i \
|
||||||
ln -s $prefix/fonts/* $prefix/resource/fonts/wps-office
|
--replace /usr/bin $out/bin \
|
||||||
ln -s $prefix/fontconfig/*.conf $out/etc/fonts/conf.d
|
--replace /opt/kingsoft/wps-office $prefix
|
||||||
|
done
|
||||||
ln -s $prefix/resource $out/share
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user