lol

Merge pull request #246661 from fin444/update/onlyoffice-bin/7.4.1

onlyoffice-bin: 7.2.0 -> 7.4.1

authored by

Niklas Hambüchen and committed by
GitHub
0624ecee 4c3ccd4a

+223 -1
+215
pkgs/applications/office/onlyoffice-bin/7_4.nix
··· 1 + { stdenv 2 + , lib 3 + , fetchurl 4 + , buildFHSEnv 5 + # Alphabetic ordering below 6 + , alsa-lib 7 + , at-spi2-atk 8 + , atk 9 + , autoPatchelfHook 10 + , cairo 11 + , curl 12 + , dbus 13 + , dconf 14 + , dpkg 15 + , fontconfig 16 + , gcc-unwrapped 17 + , gdk-pixbuf 18 + , glib 19 + , glibc 20 + , gsettings-desktop-schemas 21 + , gst_all_1 22 + , gtk2 23 + , gtk3 24 + , libpulseaudio 25 + , libudev0-shim 26 + , libdrm 27 + , makeWrapper 28 + , mesa 29 + , nspr 30 + , nss 31 + , pulseaudio 32 + , qt5 33 + , wrapGAppsHook 34 + , xkeyboard_config 35 + , xorg 36 + }: 37 + let 38 + 39 + # Note on fonts: 40 + # 41 + # OnlyOffice does not distribute unfree fonts, but makes it easy to pick up 42 + # any fonts you install. See: 43 + # 44 + # * https://helpcenter.onlyoffice.com/en/installation/docs-community-install-fonts-linux.aspx 45 + # * https://www.onlyoffice.com/blog/2020/04/how-to-add-new-fonts-to-onlyoffice-desktop-editors/ 46 + # 47 + # As recommended there, you should download 48 + # 49 + # arial.ttf, calibri.ttf, cour.ttf, symbol.ttf, times.ttf, wingding.ttf 50 + # 51 + # into `~/.local/share/fonts/`, otherwise the default template fonts, and 52 + # things like bullet points, will not look as expected. 53 + 54 + # TODO: Find out which of these fonts we'd be allowed to distribute along 55 + # with this package, or how to make this easier for users otherwise. 56 + 57 + # Not using the `noto-fonts-cjk` package from nixpkgs, because it was 58 + # reported that its `.ttc` file is not picked up by OnlyOffice, see: 59 + # https://github.com/NixOS/nixpkgs/pull/116343#discussion_r593979816 60 + noto-fonts-cjk = fetchurl { 61 + url = 62 + let 63 + version = "v20201206-cjk"; 64 + in 65 + "https://github.com/googlefonts/noto-cjk/raw/${version}/NotoSansCJKsc-Regular.otf"; 66 + sha256 = "sha256-aJXSVNJ+p6wMAislXUn4JQilLhimNSedbc9nAuPVxo4="; 67 + }; 68 + 69 + runtimeLibs = lib.makeLibraryPath [ 70 + curl 71 + glibc 72 + gcc-unwrapped.lib 73 + libudev0-shim 74 + pulseaudio 75 + ]; 76 + 77 + derivation = stdenv.mkDerivation rec { 78 + pname = "onlyoffice-desktopeditors"; 79 + version = "7.4.1"; 80 + minor = null; 81 + src = fetchurl { 82 + url = "https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v${version}/onlyoffice-desktopeditors_amd64.deb"; 83 + sha256 = "sha256-vaBF3GJyLBldWdEruOeVpRvwGNwaRl7IKPguDLRoe8M="; 84 + }; 85 + 86 + nativeBuildInputs = [ 87 + autoPatchelfHook 88 + dpkg 89 + makeWrapper 90 + wrapGAppsHook 91 + ]; 92 + 93 + buildInputs = [ 94 + alsa-lib 95 + at-spi2-atk 96 + atk 97 + cairo 98 + dbus 99 + dconf 100 + fontconfig 101 + gdk-pixbuf 102 + glib 103 + gsettings-desktop-schemas 104 + gst_all_1.gst-plugins-base 105 + gst_all_1.gstreamer 106 + gtk2 107 + gtk3 108 + libpulseaudio 109 + libdrm 110 + nspr 111 + nss 112 + mesa # libgbm 113 + qt5.qtbase 114 + qt5.qtdeclarative 115 + qt5.qtsvg 116 + qt5.qtwayland 117 + xorg.libX11 118 + xorg.libxcb 119 + xorg.libXcomposite 120 + xorg.libXcursor 121 + xorg.libXdamage 122 + xorg.libXext 123 + xorg.libXfixes 124 + xorg.libXi 125 + xorg.libXrandr 126 + xorg.libXrender 127 + xorg.libXScrnSaver 128 + xorg.libXtst 129 + ]; 130 + 131 + dontWrapQtApps = true; 132 + 133 + unpackPhase = '' 134 + dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner 135 + ''; 136 + 137 + preConfigure = '' 138 + cp --no-preserve=mode,ownership ${noto-fonts-cjk} opt/onlyoffice/desktopeditors/fonts/ 139 + ''; 140 + 141 + installPhase = '' 142 + runHook preInstall 143 + 144 + mkdir -p $out/{bin,lib,share} 145 + 146 + mv usr/bin/* $out/bin 147 + mv usr/share/* $out/share/ 148 + mv opt/onlyoffice/desktopeditors $out/share 149 + 150 + for f in $out/share/desktopeditors/asc-de-*.png; do 151 + size=$(basename "$f" ".png" | cut -d"-" -f3) 152 + res="''${size}x''${size}" 153 + mkdir -pv "$out/share/icons/hicolor/$res/apps" 154 + ln -s "$f" "$out/share/icons/hicolor/$res/apps/onlyoffice-desktopeditors.png" 155 + done; 156 + 157 + substituteInPlace $out/bin/onlyoffice-desktopeditors \ 158 + --replace "/opt/onlyoffice/" "$out/share/" 159 + 160 + ln -s $out/share/desktopeditors/DesktopEditors $out/bin/DesktopEditors 161 + 162 + runHook postInstall 163 + ''; 164 + 165 + preFixup = '' 166 + gappsWrapperArgs+=( 167 + --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \ 168 + --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \ 169 + --set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \ 170 + --set QT_QPA_PLATFORM "xcb" 171 + # the bundled version of qt does not support wayland 172 + ) 173 + ''; 174 + 175 + passthru.updateScript = ./update.sh; 176 + }; 177 + 178 + in 179 + 180 + # In order to download plugins, OnlyOffice uses /usr/bin/curl so we have to wrap it. 181 + # Curl still needs to be in runtimeLibs because the library is used directly in other parts of the code. 182 + buildFHSEnv { 183 + name = derivation.name; 184 + 185 + targetPkgs = pkgs': [ 186 + curl 187 + derivation 188 + ]; 189 + 190 + runScript = "/bin/onlyoffice-desktopeditors"; 191 + 192 + extraInstallCommands = '' 193 + mv $out/bin/$name $out/bin/onlyoffice-desktopeditors 194 + mkdir -p $out/share 195 + ln -s ${derivation}/share/icons $out/share 196 + cp -r ${derivation}/share/applications $out/share 197 + substituteInPlace $out/share/applications/onlyoffice-desktopeditors.desktop \ 198 + --replace "/usr/bin/onlyoffice-desktopeditors" "$out/bin/onlyoffice-desktopeditors" 199 + ''; 200 + 201 + meta = with lib; { 202 + description = "Office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents"; 203 + longDescription = '' 204 + This version is broken on wlroots environments (e.g. Hyprland, Sway). 205 + If you are using one of these environments, please use `onlyoffice-bin` instead. 206 + ''; 207 + homepage = "https://www.onlyoffice.com/"; 208 + downloadPage = "https://github.com/ONLYOFFICE/DesktopEditors/releases"; 209 + changelog = "https://github.com/ONLYOFFICE/DesktopEditors/blob/master/CHANGELOG.md"; 210 + platforms = [ "x86_64-linux" ]; 211 + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 212 + license = licenses.agpl3Plus; 213 + maintainers = with maintainers; [ nh2 gtrunsec ]; 214 + }; 215 + }
+4
pkgs/applications/office/onlyoffice-bin/default.nix pkgs/applications/office/onlyoffice-bin/7_2.nix
··· 177 177 178 178 meta = with lib; { 179 179 description = "Office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents"; 180 + longDescription = '' 181 + The latest versions of OnlyOffice are currently broken on wlroots environments (e.g. Hyprland, Sway). 182 + If you are using a different environment, you can get the latest version using `onlyoffice-bin_latest`. 183 + ''; 180 184 homepage = "https://www.onlyoffice.com/"; 181 185 downloadPage = "https://github.com/ONLYOFFICE/DesktopEditors/releases"; 182 186 changelog = "https://github.com/ONLYOFFICE/DesktopEditors/blob/master/CHANGELOG.md";
+4 -1
pkgs/top-level/all-packages.nix
··· 34294 34294 34295 34295 okteto = callPackage ../development/tools/okteto { }; 34296 34296 34297 - onlyoffice-bin = callPackage ../applications/office/onlyoffice-bin { }; 34297 + onlyoffice-bin_7_2 = callPackage ../applications/office/onlyoffice-bin/7_2.nix { }; 34298 + onlyoffice-bin_7_4 = callPackage ../applications/office/onlyoffice-bin/7_4.nix { }; 34299 + onlyoffice-bin = onlyoffice-bin_7_2; 34300 + onlyoffice-bin_latest = onlyoffice-bin_7_4; 34298 34301 34299 34302 onmetal-image = callPackage ../tools/virtualization/onmetal-image { }; 34300 34303