New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slack: add libs to runtime #24687
slack: add libs to runtime #24687
Conversation
Allow slack to load all the libraries dynamically as well
@zimbatm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @greyson, @fooblahblah and @abbradar to be potential reviewers. |
@@ -73,7 +73,8 @@ in stdenv.mkDerivation { | |||
|
|||
# Fix the symlink | |||
rm $out/bin/slack | |||
ln -s $out/lib/slack/slack $out/bin/slack | |||
makeWrapper $out/lib/slack/slack $out/bin/slack \ | |||
--set LD_LIBRARY_PATH ${rpath} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always thought, that LD_LIBRARY_PATH and rpath
in the elf file have the same semantic. Maybe the rpath is stripped afterwards in the fixupPhase
. Have you tried moving patchelf
to postFixup
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The slack binary itself doesn't have libxkbfile.so as a dependency. Wouldn't the path to libkbfile be removed from the rpath in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zimbatm It wouldn't if you set dontPatchELF = true or do your patching in postFixup (I personally prefer the former). It is trimmed by patchelf --shrink-rpath in the fixup phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I guess --set
as opposed to addition means that OpenGL drivers are not found. It is an Electron application, so it would use GPU to offload part of the rendering, right?
I stopped having issues with the latest master so that can be closed. dontPatchELF seems like a better route and I will keep that in mind if I get issues again. |
Allow slack to load all the libraries dynamically as well
Motivation for this change
Fixes #24685 with a shotgun approach.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)