-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
element-desktop: build native modules #124907
Conversation
Result of 1 package built successfully:
3 suggestions:
Result of 1 package built successfully:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for doing this!
nativeBuildInputs = [ | ||
makeWrapper | ||
python3 rustc cargo rustPlatform.cargoSetupHook pkg-config yarn | ||
sqlcipher libsecret # FIXME this should be in buildInputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: which dependency is this comment referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sqlcipher and libsecret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should I do about it? Theoretically they belong in buildInputs, but adding them to buildInputs breaks the build (I have no idea why).
pkgs/applications/networking/instant-messengers/element/element-desktop.nix
Outdated
Show resolved
Hide resolved
This might fix the build with electron 13: neon-bindings/neon#715 |
Nope, can't find a solution for Electron 13. Let's wait until upstream switches to Electron 13. |
This works fine for me, even when the state has been used with Electron 13.1.x before. |
This is not working for me. I get the error in the Security & Privacy/Search/Message Search menu:
Naturally, I clicked |
This solution works for me, I have put it in my local overrides together with source-built schildichat, and I don't know what else I could do to make it work for others. |
Weird. I can reproduce the same issue, now even with a fresh account, less than 1 week old and less than 1000 messages in total. So this is not an artifact of my account I hope. Again I get the
Error. So I searched a bit. This issue makes me think that there is a high chance that the SQLCipher error is related to the search not working. So I try to investigate that a bit more. I'm quite sure that the error originates from here: https://github.com/matrix-org/seshat/blob/d43e278d65e656a895cec73ec951f044e0de2c7b/seshat-node/native/src/lib.rs#L157. That functions implementation is over here. Now, for SQLCipher support, the following crate is used: https://crates.io/crates/rusqlite . This on then uses https://crates.io/crates/libsqlite3-sys to bind to bind the sqlite C API. So there we are, I believe somehow the Edit: Oh and this is where the very error string seems to originate from: https://github.com/matrix-org/seshat/blob/7930413986f15225dc7d27848e8b60fea94bb226/src/database/mod.rs#L212 . |
In the most recent TWIM update: https://matrix.to/#/!xYvNcQPhnkrdUmYczI:matrix.org/$GGkvPA3b6FuXSquNBq0O9w3ntFnhjcUHsevegeWhc7s?via=matrix.org&via=maunium.net&via=envs.net under "Web"
May be worth making another stab at this since I think that Electron 13 compatibility was one of the issues that @petabyteboy was having? |
I implemented the n-api based seshat interface, so I am very aware that it exists, but I'm not interested in spending any more time on this, since my current solution works fine for me and other people. Also the same things still apply:
|
The issue I had is resolved by #132601 . |
Fixes #87752
There might be room for improvement, but it works.
For example, there is a tradeoff to be made between ease of updating and the size of the files that have to be included in nixpkgs as well as the output size.
An alternative approach would be building the native extensions in their own derivations. This way we could avoid having a modified yarn.lock for element-desktop shipped in the repository. However the native extensions would have to be updated seperately, and we would have to implement some of the electron build environment logic ourselves, not much, ~20 lines, but it would have to be maintained.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)