Skip to content

Commit

Permalink
Merge pull request #98483 from danieldk/freeoffice-979-20.03
Browse files Browse the repository at this point in the history
[20.03] Update SoftMaker Office/FreeOffice
  • Loading branch information
danieldk committed Sep 30, 2020
2 parents 414eedc + f8271cb commit b4db68f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/office/softmaker/freeoffice.nix
Expand Up @@ -2,13 +2,13 @@

callPackage ./generic.nix (args // rec {
pname = "freeoffice";
version = "976";
version = "978";
edition = "2018";
suiteName = "FreeOffice";

src = fetchurl {
url = "https://www.softmaker.net/down/softmaker-freeoffice-${version}-amd64.tgz";
sha256 = "13yh4lyqakbdqf4r8vw8imy5gwpfva697iqfd85qmp3wimqvzskl";
sha256 = "1c5div1kbyyj48f89wkhc1i1759n70bsbp3w4a42cr0jmllyl60v";
};

archive = "freeoffice${edition}.tar.lzma";
Expand Down
28 changes: 5 additions & 23 deletions pkgs/applications/office/softmaker/generic.nix
Expand Up @@ -5,7 +5,7 @@

# For fixing up execution of /bin/ls, which is necessary for
# product unlocking.
, coreutils, libredirect
, coreutils

, pname, version, edition, suiteName, src, archive

Expand Down Expand Up @@ -49,22 +49,7 @@ in stdenv.mkDerivation rec {
runHook postUnpack
'';

installPhase = let
# SoftMaker/FreeOffice collects some system information upon
# unlocking the product. But in doing so, it attempts to execute
# /bin/ls. If the execve syscall fails, the whole unlock
# procedure fails. This works around that by rewriting /bin/ls
# to the proper path.
#
# SoftMaker Office restarts itself upon some operations, such
# changing the theme and unlocking. Unfortunately, we do not
# have control over its environment then and it will fail
# with an error.
lsIntercept = ''
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls"
'';
in ''
installPhase = ''
runHook preInstall
mkdir -p $out/share
Expand All @@ -73,12 +58,9 @@ in stdenv.mkDerivation rec {
# Wrap rather than symlinking, so that the programs can determine
# their resource path.
mkdir -p $out/bin
makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker \
${lsIntercept}
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
${lsIntercept}
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
${lsIntercept}
makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker
for size in 16 32 48 64 96 128 256 512 1024; do
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/office/softmaker/softmaker_office.nix
Expand Up @@ -2,13 +2,13 @@

callPackage ./generic.nix (args // rec {
pname = "softmaker-office";
version = "976";
version = "978";
edition = "2018";
suiteName = "SoftMaker Office";

src = fetchurl {
url = "https://www.softmaker.net/down/softmaker-office-${edition}-${version}-amd64.tgz";
sha256 = "0j6zm0cbxrcgm7glk84hvvbp4z0ys6v8bkwwhl5r7dbphyi72fw8";
sha256 = "14qnlbczq1zcz24vwy2yprdvhyn6bxv1nc1w6vjyq8w5jlwqsgbr";
};

archive = "office${edition}.tar.lzma";
Expand Down

0 comments on commit b4db68f

Please sign in to comment.