Closed colemickens closed 3 years ago
Would be fantastic to have riot-desktop
built with seshat
. I tried building it myself but couldn't do it. :cry:
Just stumbled across this myself. What's the current state on this? What needs to be done before this can be fixed?
So, element seems to use its own build system hak
to build these native dependencies. It tries to download and build those itself with cargo and stuff. Seems quite complicated to package.
I would like to add that support for desktop notifications would be also appreciated. (They showed up on Arch's version, at least)
Edit: This problem has been resolved since
I made some progress. This solves the issue of downloading the hakDependencies. Unfortunately they are not locked in any way, so we need to lock them at packaging-time (is that even a term?) by adding them to yarn.lock and yarn.nix. Since yarn2nix always runs yarn with --ignore-scripts
, we can safely ignore the upstream reasoning for fetching them outside of yarn dependencies.
I'm now at the point where it tries to build seshat in the element-desktop derivation, but unfortunately they don't provide a Cargo lockfile. I'm working on resolving this problem upstream: https://github.com/matrix-org/seshat/pull/79
It turns out to be much more complicated, because the cargo build of seshat-node-native calls npm install
, so we have multiple layers of npm calling yarn calling cargo calling npm. With lots of things being downloaded and executed. It's a huge shitshow.
Is there anything we could do to help fix building element-desktop
with encrypted chat search working on NixOS?
I poured some (many) more hours into this today. I can build the two native modules, matrix-seshat and keytar, both in a seperate derivation and as part of the element-desktop build. However, I can not build them correctly against electron's node lib, so when starting the compiled thing, it refuses to load the module. Attempting to build against electron gives a mystic error.
$ nix-build https://github.com/petabyteboy/nixpkgs/archive/feature/seshat1.tar.gz -A element-desktop.seshat-node
Or the second approach, with everything in one derivation using the hak tool:
$ nix-build https://github.com/petabyteboy/nixpkgs/archive/feature/seshat2.tar.gz -A element-desktop
\
Is there anything we could do to help fix building
element-desktop
with encrypted chat search working on NixOS?
@teutat3s If you can find a fix for the error, there shouldn't be much work left.
I think I found the solution to that error: Upstream is using Electron 12.x while we are using Electron 13.x.
PR incoming :sparkles:
Describe the bug
Under the "Message search" heading, observe:
it links to here: https://github.com/vector-im/riot-web/blob/develop/docs/native-node-modules.md#adding-seshat-for-search-in-e2e-encrypted-rooms
Notify maintainers cc: @pacien @worldofpeace
Metadata
Maintainer information: