Merge pull request #262126 from fin444/onlyoffice-bin/7.5

onlyoffice-bin_latest: 7.4.1 -> 7.5.1, improve inclusion of noto fonts
This commit is contained in:
Peder Bergebakken Sundt 2023-11-19 17:20:18 +01:00 committed by GitHub
commit d08965eda2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 20 deletions

View file

@ -26,6 +26,7 @@
, libdrm , libdrm
, makeWrapper , makeWrapper
, mesa , mesa
, noto-fonts-cjk-sans
, nspr , nspr
, nss , nss
, pulseaudio , pulseaudio
@ -54,18 +55,6 @@ let
# TODO: Find out which of these fonts we'd be allowed to distribute along # TODO: Find out which of these fonts we'd be allowed to distribute along
# with this package, or how to make this easier for users otherwise. # with this package, or how to make this easier for users otherwise.
# Not using the `noto-fonts-cjk` package from nixpkgs, because it was
# reported that its `.ttc` file is not picked up by OnlyOffice, see:
# https://github.com/NixOS/nixpkgs/pull/116343#discussion_r593979816
noto-fonts-cjk = fetchurl {
url =
let
version = "v20201206-cjk";
in
"https://github.com/googlefonts/noto-cjk/raw/${version}/NotoSansCJKsc-Regular.otf";
sha256 = "sha256-aJXSVNJ+p6wMAislXUn4JQilLhimNSedbc9nAuPVxo4=";
};
runtimeLibs = lib.makeLibraryPath [ runtimeLibs = lib.makeLibraryPath [
curl curl
glibc glibc
@ -76,11 +65,11 @@ let
derivation = stdenv.mkDerivation rec { derivation = stdenv.mkDerivation rec {
pname = "onlyoffice-desktopeditors"; pname = "onlyoffice-desktopeditors";
version = "7.4.1"; version = "7.5.1";
minor = null; minor = null;
src = fetchurl { src = fetchurl {
url = "https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${version}/onlyoffice-desktopeditors_amd64.deb"; url = "https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${version}/onlyoffice-desktopeditors_amd64.deb";
sha256 = "sha256-vaBF3GJyLBldWdEruOeVpRvwGNwaRl7IKPguDLRoe8M="; sha256 = "sha256-Hf5CNbUUMuHZHDY3fgD4qpF4UASevscK8DTZlauyHhY=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -134,10 +123,6 @@ let
dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner
''; '';
preConfigure = ''
cp --no-preserve=mode,ownership ${noto-fonts-cjk} opt/onlyoffice/desktopeditors/fonts/
'';
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -179,12 +164,14 @@ in
# In order to download plugins, OnlyOffice uses /usr/bin/curl so we have to wrap it. # In order to download plugins, OnlyOffice uses /usr/bin/curl so we have to wrap it.
# Curl still needs to be in runtimeLibs because the library is used directly in other parts of the code. # Curl still needs to be in runtimeLibs because the library is used directly in other parts of the code.
# Fonts are also discovered by looking in /usr/share/fonts, so adding fonts to targetPkgs will include them
buildFHSEnv { buildFHSEnv {
name = derivation.name; name = derivation.name;
targetPkgs = pkgs': [ targetPkgs = pkgs': [
curl curl
derivation derivation
noto-fonts-cjk-sans
]; ];
runScript = "/bin/onlyoffice-desktopeditors"; runScript = "/bin/onlyoffice-desktopeditors";

View file

@ -34092,9 +34092,9 @@ with pkgs;
okteto = callPackage ../development/tools/okteto { }; okteto = callPackage ../development/tools/okteto { };
onlyoffice-bin_7_2 = callPackage ../applications/office/onlyoffice-bin/7_2.nix { }; onlyoffice-bin_7_2 = callPackage ../applications/office/onlyoffice-bin/7_2.nix { };
onlyoffice-bin_7_4 = callPackage ../applications/office/onlyoffice-bin/7_4.nix { }; onlyoffice-bin_7_5 = callPackage ../applications/office/onlyoffice-bin/7_5.nix { };
onlyoffice-bin = onlyoffice-bin_7_2; onlyoffice-bin = onlyoffice-bin_7_2;
onlyoffice-bin_latest = onlyoffice-bin_7_4; onlyoffice-bin_latest = onlyoffice-bin_7_5;
onmetal-image = callPackage ../tools/virtualization/onmetal-image { }; onmetal-image = callPackage ../tools/virtualization/onmetal-image { };