The new zoom version has problems showing the settings dialog.
Tested with linux platform: The following values for `LANG`
create a settings dialog where most items are not visible:
* de_AT.UTF-8
* de_DE.UTF-8
* es_CU.UTF-8
* fr_FR.UTF-8
* sr_RS.UTF-8
* tt_RU.UTF-8
whereas these values don't cause any breakage:
* C.UTF-8
* en_CA.UTF-8
* en_GB.UTF-8
* en_US.UTF-8
As zoom has its own language setting,
this update simply clears the LANG variable
to avoid any problems in the settings dialog.
To reduce the closure size of the zoom-us package,
this commit replaces the `xdgDesktopPortalSupport`
option with several new options that permit to (de-)select
several XDG desktop portal packages to be used by `zoom-us`.
Furthermore, two new options permit to inject further packages
(e.g. individual XDG desktop portal packages) into the virtual
filesystem that will be prepared by bubblewrap for zoom-us:
* `targetPkgs` is a *function* that maps the `pkgs`
packages attrset to a list of packages.
* `targetPkgsFixed` is a simple list of packages.
`targetPkgs` should be preferred before
`targetPkgsFixed` if possible, as the `buildFHSEnv`
mechanism expects a function as explained above:
It needs to extract a list of dependency
packages for a `pkgs` package attrset.
Package injection likely also works if `targetPkgsFixed`
is used, but that creates a liability
in that changes of the `buildFHSEnv` implementation might
(at least more likely) break zoom-us in unexpected ways.
Note: This now *disables* all
XDG desktop portal packages by default.
Co-authored-by: Philip Taron <philip.taron@gmail.com>
This reverts commit 27f0cbcf54.
Darwin support is still desired and there is nothing wrong in supporting
it. MacOS doesn't need FHS hack.
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
Zoom seems to work fine without
* cd'ing into its `/opt/zoom` directory
* unsetting `QML2_IMPORT_PATH` and `QT_SCREEN_SCALE_FACTORS`
before starting `ZoomLauncher`.
However, unsetting `QT_PLUGIN_PATH` is still required,
at least when Zoom is used within plasma 5.
While the currently packages Zoom version 6.3.11.7212
is still usabe without FHS environment,
the newer version 6.4.1.587 isn't:
The dynamic loader trick of commit
3f58227a38
can also be applied to `ZoomLauncher`,
making it start again.
However, `ZoomWebviewHost` won't work anymore:
Apparently it also requires the dynamic loader trick;
However, it tries to call itself, calling the dynamic loader,
which then doesn't know what to do.
The result is Zoom causing high CPU load while the main window
is visible, as it endlessly tries to start `ZoomWebviewHost`,
which is apparently needed to show the dashboard.
The commit at hand wraps Zoom in a `buildFHSEnv`.
This is the only possible way to ensure Zoom programs can be
executed without altering them with patchelf or wrapping them.
In detail:
* The derivation that was created before this
commit is still needed (also for linus system).
It is now moved into a let-in variable (`unpacked`)
so it can be used for darwin (still unchanged)
and for linux (wrapped by FHS env).
Linux-specific wrapping is removed as we now need the
zoom directory structure unmodified, as packaged by Zoom.
In particular, this removes the `postFixup` section,
or rather, keeps only the darwin-specific part.
This part of the commit's diff is likely best
readable with `git diff --color-words=.`.
* As a convenience for later updates, a comment is added that
might help searching for missing library dependencies.
* The lists of dependencies (`libs` and `binPath`)
are merged into a function `linuxGetDependencies`.
It is no longer meaningful to keep them separate as the FHS
environment merges all those packages into on unified tree.
It is also not always clear whether a
package is used as "program" or a "library"
(e.g. pipewire, or possibly `xdg-desktop-portal`).
As required by `buildFHSEnv`, the function
`linuxGetDependencies` is called with `pkgs` as its
only argument and returns a list of packages that
will be made available in the FHS environment.
This mechanism is meant to facilitate multi-arch packages
(e.g. i686 running on x86-64), so zoom should work alright
(on x86_64-linux) if we ignore `pkgs` and just provide
our packages as before; but there is no reason to deviate
from the mechanism that is provided by `buildFHSEnv`.
Checking library dependencies with `autoPatchelfHook` uncovered
some missing libraries that are required by vendored files.
While zoom seems to work alright without those,
adding them to the LD_LIBRARY_PATH seems to be The Right Thing
and might avoid subtle bugs now or in the future.
They are not doing anything right now. This is in preparation for their
complete removal from the tree.
Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.
Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458