git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #98413 from danieldk/softmaker-remove-intercept

softmaker-office: remove /bin/ls intercept

commit260f03f9e6e1c037d52c9b7ec5b902a62c57ef16 authorDaniël de Kok <me@danieldk.eu> dateTue 22 Sep 2020, 17:53 (6 years ago) parent807654ce883c65
1 file changed+5−23
pkgs/applications/office/softmaker/generic.nix+5−23
pkgs/applications/office/softmaker/generic.nix+5−23
@@ -5,7 +5,7 @@
55
66 # For fixing up execution of /bin/ls, which is necessary for
77 # product unlocking.
8−, coreutils, libredirect
8+, coreutils
99
1010, pname, version, edition, suiteName, src, archive
1111
@@ -52,22 +52,7 @@ in stdenv.mkDerivation {
5252 runHook postUnpack
5353 '';
5454
55− installPhase = let
56− # SoftMaker/FreeOffice collects some system information upon
57− # unlocking the product. But in doing so, it attempts to execute
58− # /bin/ls. If the execve syscall fails, the whole unlock
59− # procedure fails. This works around that by rewriting /bin/ls
60− # to the proper path.
61− #
62− # SoftMaker Office restarts itself upon some operations, such
63− # changing the theme and unlocking. Unfortunately, we do not
64− # have control over its environment then and it will fail
65− # with an error.
66− lsIntercept = ''
67− --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
68− --set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls"
69− '';
70− in ''
55+ installPhase = ''
7156 runHook preInstall
7257
7358 mkdir -p $out/share
@@ -76,12 +61,9 @@ in stdenv.mkDerivation {
7661 # Wrap rather than symlinking, so that the programs can determine
7762 # their resource path.
7863 mkdir -p $out/bin
79− makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker \
80− ${lsIntercept}
81− makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
82− ${lsIntercept}
83− makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
84− ${lsIntercept}
64+ makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker
65+ makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations
66+ makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker
8567
8668 for size in 16 32 48 64 96 128 256 512 1024; do
8769 mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps