Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
TODO: We're still using the old API ID (like the Arch package) which
should be used for testing only.
I've tried to contact the Telegram team multiple times via different
channels but didn't get a response so far. See [0],[1] for more details.
[0]: https://github.com/telegramdesktop/tdesktop/issues/4717
[1]: 65b2db2160
tdesktopPackages.preview: 1.3.7 -> 1.3.10
Without the patch the build will fail with the following error:
[ 15%] Building CXX object CMakeFiles/lib_export.dir/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.o
/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.cpp: In lambda function:
/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.cpp:712:56: internal compiler error: Segmentation fault
if constexpr (MTPDphotos_photos::Is<decltype(data)>()) {
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [CMakeFiles/lib_export.dir/build.make:77: CMakeFiles/lib_export.dir/build/tdesktop/Telegram/SourceFiles/export/export_api_wrap.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1101: CMakeFiles/lib_export.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Note: I'm not packaging this as stable for now as there might be some
issues left (see GitHub), it says "Version 1.3 alpha" in the bottom left
corner, and I've only got a "New in version 1.2.25" message.