wpsoffice{-cn}: 11.1.0.11711 -> 11.1.0.11719
This commit is contained in:
parent
f63ce824cd
commit
6d5db91a7f
|
@ -16,20 +16,49 @@
|
||||||
, xorg
|
, xorg
|
||||||
, cups
|
, cups
|
||||||
, pango
|
, pango
|
||||||
|
, runCommandLocal
|
||||||
|
, curl
|
||||||
|
, coreutils
|
||||||
|
, cacert
|
||||||
, useChineseVersion ? false
|
, useChineseVersion ? false
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
pkgVersion = "11.1.0.11719";
|
||||||
|
url =
|
||||||
|
if useChineseVersion then
|
||||||
|
"https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${lib.last (lib.splitVersion pkgVersion)}/wps-office_${pkgVersion}_amd64.deb"
|
||||||
|
else
|
||||||
|
"https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/${lib.last (lib.splitVersion pkgVersion)}/wps-office_${pkgVersion}.XA_amd64.deb";
|
||||||
|
hash =
|
||||||
|
if useChineseVersion then
|
||||||
|
"sha256-LgE5du2ZnMsAqgoQkY63HWyWYA5TLS5I8ArRYrpxffs="
|
||||||
|
else
|
||||||
|
"sha256-6fXzHSMzZDGuBubOXsHA0YEUGKcy5QIPg3noyxUbdjA=";
|
||||||
|
uri = builtins.replaceStrings [ "https://wps-linux-personal.wpscdn.cn" ] [ "" ] url;
|
||||||
|
securityKey = "7f8faaaa468174dc1c9cd62e5f218a5b";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wpsoffice";
|
pname = "wpsoffice";
|
||||||
version = "11.1.0.11711";
|
version = pkgVersion;
|
||||||
|
|
||||||
src = if useChineseVersion then fetchurl {
|
src = runCommandLocal (if useChineseVersion then "wps-office_${version}_amd64.deb" else "wps-office_${version}.XA_amd64.deb")
|
||||||
url = "https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${lib.last (lib.splitVersion version)}/wps-office_${version}_amd64.deb";
|
{
|
||||||
hash = "sha256-JHSTZZnOZoTpj8zF4C5PmjTkftEdxbeaqweY3ITiJto=";
|
outputHashMode = "recursive";
|
||||||
} else fetchurl {
|
outputHashAlgo = "sha256";
|
||||||
url = "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/${lib.last (lib.splitVersion version)}/wps-office_${version}.XA_amd64.deb";
|
outputHash = hash;
|
||||||
hash = "sha256-2apkSE/8Wm6/OQ4x5n1PE1emhovqOgD0NVTY5QZZTYA=";
|
|
||||||
};
|
nativeBuildInputs = [ curl coreutils ];
|
||||||
|
|
||||||
|
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
} ''
|
||||||
|
timestamp10=$(date '+%s')
|
||||||
|
md5hash=($(echo -n "${securityKey}${uri}$timestamp10" | md5sum))
|
||||||
|
|
||||||
|
curl \
|
||||||
|
--retry 3 --retry-delay 3 \
|
||||||
|
"${url}?t=$timestamp10&k=$md5hash" \
|
||||||
|
> $out
|
||||||
|
'';
|
||||||
|
|
||||||
unpackCmd = "dpkg -x $src .";
|
unpackCmd = "dpkg -x $src .";
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
@ -102,6 +131,6 @@ stdenv.mkDerivation rec {
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
hydraPlatforms = [ ];
|
hydraPlatforms = [ ];
|
||||||
license = licenses.unfreeRedistributable;
|
license = licenses.unfreeRedistributable;
|
||||||
maintainers = with maintainers; [ mlatus th0rgal rewine ];
|
maintainers = with maintainers; [ mlatus th0rgal rewine pokon548 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user