Code change:
Describe the bug Riot-Desktop -Security & Privacy Under the "Message search" heading, observe: Riot is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom Riot Desktop with search components . it links to here: Notify maintainers cc: Metadata Maintainer information:
Would be fantastic to have built with . 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 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 and Since yarn2nix always runs yarn with , 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: <details</details
It turns out to be much more complicated, because the cargo build of seshat-node-native calls , 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 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. Or the second approach, with everything in one derivation using the hak tool: <details</details<rantHonestly it's just a horrible build system. hak and neon and so on don't give any consideration to users who want to build the libraries in an environment without an internet connection. </rant 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:

Related discussion:
text: <ins> { stdenv, fetchFromGitHub, nodejs-14_x, python3, callPackage, fixup_yarn_lock, yarn, pkg-config, libsecret }: stdenv.mkDerivation rec { pname = "keytar"; version = "7.7.0"; src = fetchFromGitHub { owner = "atom"; repo = "node-keytar"; rev = "v${version}"; sha256 = "0ajvr4kjbyw2shb1y14c0dsghdlnq30f19hk2sbzj6n9y3xa3pmi"; }; nativeBuildInputs = [ nodejs-14_x python3 yarn pkg-config]; buildInputs = [ libsecret ]; npm_config_nodedir = nodejs-14_x; yarnOfflineCache = (callPackage ./yarn.nix {}).offline_cache; buildPhase = '' cp ${./yarn.lock} ./yarn.lock chmod u+w . ./yarn.lock export HOME=/tmp yarn config --offline set yarn-offline-mirror ${yarnOfflineCache} ${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive patchShebangs node_modules/ node_modules/.bin/node-gyp rebuild ''; doCheck = false; installPhase = '' shopt -s extglob rm -rf node_modules mkdir -p $out cp -r ./!(build) $out install -D -t $out/build/Release build/Release/keytar.node ''; } </ins>