Skip to content

packaging: add Nix flake using the Element Desktop wrapper - #238

Open
Tenshock wants to merge 3 commits into
tchapgouv:masterfrom
Tenshock:feat/nix-package
Open

Tenshock wants to merge 3 commits into
tchapgouv:masterfrom
Tenshock:feat/nix-package

Conversation

@Tenshock

@Tenshock Tenshock commented Jul 28, 2026 •

Copy link
Copy Markdown

Summary

This PR adds reproducible Nix packaging for Tchap Desktop.

Instead of building the repository’s Tauri application, it packages Tchap Web inside nixpkgs’ element-desktop Electron shell. This follows the strategy discussed in #161 and avoids current Linux WebView limitations, notably incomplete WebRTC support.

Packaging choices

The package:

  • Uses Tchap Web 4.21.5 and its production archive
  • Reuses the pinned nixpkgs element-desktop derivation
  • Disables self-updates with --no-update
  • Uses gnome-libsecret for password storage on Linux
  • Applies Tchap branding, icons and application identifiers
  • Registers tchap:// links and preserves %u URL forwarding
  • Installs Tchap.app with its packaged web application on Darwin

Updates remain declarative: new releases require updating the version, archive name and fixed-output hash.

Supported flake systems are:

  • x86_64-linux
  • aarch64-linux
  • aarch64-darwin

x86_64-darwin is omitted because the pinned element-desktop package does not support it.

Verification

All packages and smoke checks evaluate successfully:

nix flake check --all-systems --no-build

The native x86_64-linux package builds successfully:

nix build .#tchap-desktop --no-link

The Linux smoke check validates the executable, web application, icon, desktop entry, deep-link registration and wrapper arguments. It also starts the application under Xvfb and an isolated D-Bus session to detect immediate startup failures.

Repository validation also passes:

git diff --check

Limitations

The following remain untested:

  • Native aarch64-linux build and runtime
  • Native aarch64-darwin build and runtime
  • End-to-end tchap:// handling
  • macOS launching and signing

@Tenshock
Tenshock force-pushed the feat/nix-package branch 2 times, most recently from 10198a9 to 7c3c954 Compare August 14, 2026 11:07
@Tenshock

Tenshock commented Aug 14, 2026 •

Copy link
Copy Markdown
Author

@jdauphant-dinum, any thoughts on this?

@Tenshock
Tenshock force-pushed the feat/nix-package branch 2 times, most recently from c57bc33 to 02746e1 Compare August 28, 2026 08:55
@jdauphant-dinum

Copy link
Copy Markdown

@jdauphant-dinum, any thoughts on this?

Sorry @Tenshock for the late reply, I just saw your PR, we will take a look.
Ping @plegrand-dinum @rlahfa-dinum @fvo-dinum

@jdauphant-dinum

Copy link
Copy Markdown

We are still discussing internally on the best way to do it.
We keep you updated.

@Tenshock

Copy link
Copy Markdown
Author

Thanks for the update. I understand that packaging Tauri would be much more relevant, it's ok if this PR never lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants