mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Revert "softmaker-office: remove /bin/ls intercept"
This reverts commit e883c6578c
.
This commit is contained in:
parent
2a58362f8f
commit
e3b407e555
@ -5,7 +5,7 @@
|
||||
|
||||
# For fixing up execution of /bin/ls, which is necessary for
|
||||
# product unlocking.
|
||||
, coreutils
|
||||
, coreutils, libredirect
|
||||
|
||||
, pname, version, edition, suiteName, src, archive
|
||||
|
||||
@ -52,7 +52,22 @@ in stdenv.mkDerivation {
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
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 ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share
|
||||
@ -61,9 +76,12 @@ in stdenv.mkDerivation {
|
||||
# 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
|
||||
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations
|
||||
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker
|
||||
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}
|
||||
|
||||
for size in 16 32 48 64 96 128 256 512 1024; do
|
||||
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
|
||||
|
Loading…
Reference in New Issue
Block a user