Before this change:
> CMake Warning:
> Manually-specified variables were not used by the project:
>
> BUILD_TESTING
> CMAKE_EXPORT_NO_PACKAGE_REGISTRY
> CMAKE_POLICY_DEFAULT_CMP0025
> DESKTOP_APP_USE_PACKAGED_GSL
> DESKTOP_APP_USE_PACKAGED_RLOTTIE
> DESKTOP_APP_USE_PACKAGED_VARIANT
> TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
> TDESKTOP_USE_PACKAGED_TGVOIP
Thanks to Ilya Fedin and John Preston we're now allowed to reuse the
API ID of the Snap package to avoid hitting rate limits.
This finally resolves#55271 #YAY \o/
This disables the WebRTC integration for now (I didn't really look into
it so far, but probably until we have something like
TDESKTOP_USE_PACKAGED_WEBRTC=OFF).
After making `ffmpeg` point to the latest `ffmpeg_4`, all packages that
used `ffmpeg` without requiring a specific version now use ffmpeg_3
explicitly so they shouldn't change.
Regarding microsoft_gsl: The CMake scripts from Telegram-Desktop did not
find it anymore (I didn't investigate this) and Arch already made this
change during the last update. It's probably best to do the same here
especially since Telegram-Desktop is currently based on GSL 3.0.1 while
our version is still at 2.1.0.
This is not required anymore and therefore a refactoring/cleanup
(verified with diffoscope that only the output paths change).
Credit to @ilya-fedin for bringing this to my attention.
This also properly enables the spell checking with enchant2.
Note: This requires a proper configuration.
A quick and dirty solution (not recommended) could look like this:
install -Dt ~/.config/enchant/hunspell/ $(nix-build -A hunspellDicts.en_US)/share/hunspell/en_US.{aff,dic}
The GYP build is now deprecated [0].
This results in a large number of changes and many custom Nix patches
aren't required anymore (and probably haven't been required for quite
some time now, the derivation got a bit outdated...).
A lot of the changes in this commit are based on the changes of the
Arch package [1][2] (which our package is based upon).
Rough overview of the changes:
- gcc9 -> ninja (optional but let's follow Arch here)
- Dropped GYP, only CMake now
- But: Python is still required
- fetchFromGitHub -> fetchurl (optional?)
- Apply all Arch patches and remove old patches
- Requires one new patch for range-v3
- New dependencies: enchant2, lz4, xxHash
- TODO: Plus a few new dependencies that shouldn't be required
- Cleanup: Irrelevant flags (e.g. GYP_DEFINES) and patches (e.g. sed)
- Simplifies quite a few things :)
- Some additional documentation and TODOs
Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
[0]: https://github.com/telegramdesktop/tdesktop/issues/7001
[1]: https://git.archlinux.org/svntogit/community.git/commit/?id=23eff2b1ef7435441e93120618ca899f0b0e7e61
[2]: https://git.archlinux.org/svntogit/community.git/commit/?id=6a19e949724b2e2bfcdcf2081111ecd46108e449
Unfortunately the previous release (1.8.1) was crashing due to a
segmentation fault (didn't have time to investigate), but this release
works fine so far.