Skip to content
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

tdesktop: 1.8.15 -> 1.9.3 #77453

Merged
merged 1 commit into from Jan 18, 2020
Merged

tdesktop: 1.8.15 -> 1.9.3 #77453

merged 1 commit into from Jan 18, 2020

Conversation

@primeos
Copy link
Member

@primeos primeos commented Jan 10, 2020

Motivation for this change

Update: I've opened an upstream issue regarding the build problems with the previous GYP approach: telegramdesktop/tdesktop#7001. -> The GYP approach is now deprecated.

Unfortunately quite a few things changed and the build still fails :o
I cannot finish this ATM, help is very welcome if someone has time for it :)
Feel free to modify/reuse my commit, open a new PR, etc.

The build should work now.

Current PKGBUILD file from Arch (reference): https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/telegram-desktop

Upstream build instructions (unfortunately a complete mess :o):
https://github.com/telegramdesktop/tdesktop/blob/dev/docs/building-cmake.md

Rejected PR for the build errors with the GYP approach:
telegramdesktop/tdesktop#6920 (mentioned build instruction updates: telegramdesktop/tdesktop@3b562bf).

Relevant Arch package changes (our version is based on the Arch package, mainly for the patches, but we also require some additional changes):

(Edit: Seems like I missed the opportunity to open this as a draft PR... :o)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@primeos primeos force-pushed the primeos:tdesktop branch 2 times, most recently from 39de71e to e21ad96 Jan 15, 2020
@primeos primeos changed the title [WIP] tdesktop: 1.8.15 -> 1.9.3 [WIP (help wanted)] tdesktop: 1.8.15 -> 1.9.3 Jan 15, 2020
@primeos primeos force-pushed the primeos:tdesktop branch 3 times, most recently from 3cadda5 to e9e8e28 Jan 17, 2020
@primeos primeos changed the title [WIP (help wanted)] tdesktop: 1.8.15 -> 1.9.3 tdesktop: 1.8.15 -> 1.9.3 Jan 18, 2020
@primeos primeos force-pushed the primeos:tdesktop branch from e9e8e28 to 060daab Jan 18, 2020
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]: telegramdesktop/tdesktop#7001
[1]: https://git.archlinux.org/svntogit/community.git/commit/?id=23eff2b1ef7435441e93120618ca899f0b0e7e61
[2]: https://git.archlinux.org/svntogit/community.git/commit/?id=6a19e949724b2e2bfcdcf2081111ecd46108e449
@primeos primeos force-pushed the primeos:tdesktop branch from 060daab to 1835ac1 Jan 18, 2020
@primeos
Copy link
Member Author

@primeos primeos commented Jan 18, 2020

Well, this was fun...

But at least Telegram-Desktop runs without any issues so far :) Let's hope there won't be many regressions... (my tests of the major features where all successful).

Spell checking (new feature) doesn't seem to work yet but IIRC there where quite a few upstream issues as well as fixes in the meantime (that should already be in 1.9.4).

@primeos primeos merged commit f430ac7 into NixOS:master Jan 18, 2020
16 checks passed
16 checks passed
tdesktop on aarch64-linux Failure
Details
tdesktop on x86_64-darwin No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
tdesktop on x86_64-linux Success
Details
@timokau
Copy link
Member

@timokau timokau commented Jan 20, 2020

Thank you for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.