14 pinData = import ./element-web-pin.nix;
15 inherit (pinData.hashes) webSrcHash webYarnHash;
17 disable_guests = true; # disable automatic guest account registration at matrix.org
22 builtins.removeAttrs pinData [ "hashes" ]
24 pname = "element-web";
26 src = fetchFromGitHub {
29 rev = "v${finalAttrs.version}";
33 offlineCache = fetchYarnDeps {
34 yarnLock = finalAttrs.src + "/yarn.lock";
48 export VERSION=${finalAttrs.version}
49 yarn --offline build:res
50 yarn --offline build:module_system
51 yarn --offline build:bundle
60 # with the update of openssl3, some key ciphers are not supported anymore
61 # this flag will allow those codecs again as a workaround
62 # see https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382#5f07
63 # and https://github.com/element-hq/element-web/issues/21043
64 export NODE_OPTIONS=--openssl-legacy-provider
67 fixup-yarn-lock yarn.lock
68 yarn config --offline set yarn-offline-mirror $offlineCache
69 yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
70 patchShebangs node_modules
79 tar --extract --to-stdout --file ${jitsi-meet.src} jitsi-meet/libs/external_api.min.js > $out/jitsi_external_api.min.js
80 echo "${finalAttrs.version}" > "$out/version"
81 jq -s '.[0] * $conf' "config.sample.json" --argjson "conf" '${builtins.toJSON noPhoningHome}' > "$out/config.json"
87 description = "Glossy Matrix collaboration client for the web";
88 homepage = "https://element.io/";
89 changelog = "https://github.com/element-hq/element-web/blob/v${finalAttrs.version}/CHANGELOG.md";
90 maintainers = lib.teams.matrix.members;
91 license = lib.licenses.asl20;
92 platforms = lib.platforms.all;