From 040fabf509ed2a10098fee4a3244ff4f3daa1934 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Fri, 23 Jul 2021 11:59:27 +0200
Subject: [PATCH 1/3] element-web: 1.7.31 -> 1.7.33

ChangeLogs:
* https://github.com/vector-im/element-web/releases/tag/v1.7.33
* https://github.com/vector-im/element-web/releases/tag/v1.7.33-rc.1
* https://github.com/vector-im/element-web/releases/tag/v1.7.32
* https://github.com/vector-im/element-web/releases/tag/v1.7.32-rc.1
---
 .../networking/instant-messengers/element/element-web.nix     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/applications/networking/instant-messengers/element/element-web.nix b/pkgs/applications/networking/instant-messengers/element/element-web.nix
index d9aec35b04b1..0a0363860d17 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-web.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-web.nix
@@ -12,11 +12,11 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "element-web";
-  version = "1.7.31";
+  version = "1.7.33";
 
   src = fetchurl {
     url = "https://github.com/vector-im/element-web/releases/download/v${version}/element-v${version}.tar.gz";
-    sha256 = "1p0vg5bkri7qiqv5yic56hjjbb5zvhvyzsm5zi7fx3yb7zdxmr3f";
+    sha256 = "sha256-MhbXvl+FUCL6D6y2Oa5Kf5ie9fU85wEO/tQe881CD8I=";
   };
 
   installPhase = ''

From 07620c8697c4150ee71cfd26462d04666e781fbd Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Fri, 23 Jul 2021 12:13:29 +0200
Subject: [PATCH 2/3] element-desktop: 1.7.31 -> 1.7.33

ChangeLogs:
* https://github.com/vector-im/element-desktop/releases/tag/v1.7.33
* https://github.com/vector-im/element-desktop/releases/tag/v1.7.32
---
 .../element/element-desktop-package.json      |  36 +-
 .../element/element-desktop-yarndeps.nix      | 544 ++++++++++++++++++
 .../element/element-desktop.nix               |  13 +-
 3 files changed, 580 insertions(+), 13 deletions(-)

diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json b/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
index 063c64fa377e..e9f1c0d4eb5c 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
+++ b/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
@@ -1,8 +1,8 @@
 {
   "name": "element-desktop",
   "productName": "Element",
-  "main": "src/electron-main.js",
-  "version": "1.7.31",
+  "main": "lib/electron-main.js",
+  "version": "1.7.33",
   "description": "A feature-rich client for Matrix.org",
   "author": "Element",
   "repository": {
@@ -18,18 +18,24 @@
     "mkdirs": "mkdirp packages deploys",
     "fetch": "yarn run mkdirs && node scripts/fetch-package.js",
     "asar-webapp": "asar p webapp webapp.asar",
-    "start": "electron .",
-    "lint": "eslint src/ scripts/ hak/",
+    "start": "yarn run build:ts && yarn run build:res && electron .",
+    "lint": "yarn lint:types && yarn lint:js",
+    "lint:js": "eslint src/ scripts/ hak/",
+    "lint:types": "tsc --noEmit",
     "build:native": "yarn run hak",
-    "build32": "electron-builder --ia32",
-    "build64": "electron-builder --x64",
-    "build": "electron-builder",
+    "build:native:universal": "yarn run hak --target x86_64-apple-darwin fetchandbuild && yarn run hak --target aarch64-apple-darwin fetchandbuild && yarn run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
+    "build:32": "yarn run build:ts && yarn run build:res && electron-builder --ia32",
+    "build:64": "yarn run build:ts && yarn run build:res && electron-builder --x64",
+    "build:universal": "yarn run build:ts && yarn run build:res && electron-builder --universal",
+    "build": "yarn run build:ts && yarn run build:res && electron-builder",
+    "build:ts": "tsc",
+    "build:res": "node scripts/copy-res.js",
     "docker:setup": "docker build -t element-desktop-dockerbuild dockerbuild",
     "docker:build:native": "scripts/in-docker.sh yarn run hak",
     "docker:build": "scripts/in-docker.sh yarn run build",
     "docker:install": "scripts/in-docker.sh yarn install",
     "debrepo": "scripts/mkrepo.sh",
-    "clean": "rimraf webapp.asar dist packages deploys",
+    "clean": "rimraf webapp.asar dist packages deploys lib",
     "hak": "node scripts/hak/index.js"
   },
   "dependencies": {
@@ -42,7 +48,14 @@
     "request": "^2.88.2"
   },
   "devDependencies": {
+    "@types/auto-launch": "^5.0.1",
+    "@types/counterpart": "^0.18.1",
+    "@types/minimist": "^1.2.1",
+    "@typescript-eslint/eslint-plugin": "^4.17.0",
+    "@typescript-eslint/parser": "^4.17.0",
     "asar": "^2.0.1",
+    "chokidar": "^3.5.2",
+    "electron": "12.0.11",
     "electron-builder": "22.11.4",
     "electron-builder-squirrel-windows": "22.11.4",
     "electron-devtools-installer": "^3.1.1",
@@ -60,7 +73,8 @@
     "npm": "^6.14.11",
     "rimraf": "^3.0.2",
     "semver": "^7.3.4",
-    "tar": "^6.1.0"
+    "tar": "^6.1.0",
+    "typescript": "^4.1.3"
   },
   "hakDependencies": {
     "matrix-seshat": "^2.2.3",
@@ -68,14 +82,14 @@
   },
   "build": {
     "appId": "im.riot.app",
-    "electronVersion": "12.0.11",
+    "electronVersion": "12.0.14",
     "files": [
       "package.json",
       {
         "from": ".hak/hakModules",
         "to": "node_modules"
       },
-      "src/**"
+      "lib/**"
     ],
     "extraResources": [
       {
diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop-yarndeps.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop-yarndeps.nix
index 733cfa3a11a4..59669ebc48bd 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-desktop-yarndeps.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-desktop-yarndeps.nix
@@ -129,6 +129,14 @@
         sha1 = "3ece22c5838402419a6e0425f85742b961d9b6c6";
       };
     }
+    {
+      name = "_electron_get___get_1.12.4.tgz";
+      path = fetchurl {
+        name = "_electron_get___get_1.12.4.tgz";
+        url  = "https://registry.yarnpkg.com/@electron/get/-/get-1.12.4.tgz";
+        sha1 = "a5971113fc1bf8fa12a8789dc20152a7359f06ab";
+      };
+    }
     {
       name = "_electron_universal___universal_1.0.5.tgz";
       path = fetchurl {
@@ -417,6 +425,30 @@
         sha1 = "e8a32c30a95d20c2b1bb635cc580981a06389858";
       };
     }
+    {
+      name = "_nodelib_fs.scandir___fs.scandir_2.1.5.tgz";
+      path = fetchurl {
+        name = "_nodelib_fs.scandir___fs.scandir_2.1.5.tgz";
+        url  = "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz";
+        sha1 = "7619c2eb21b25483f6d167548b4cfd5a7488c3d5";
+      };
+    }
+    {
+      name = "_nodelib_fs.stat___fs.stat_2.0.5.tgz";
+      path = fetchurl {
+        name = "_nodelib_fs.stat___fs.stat_2.0.5.tgz";
+        url  = "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz";
+        sha1 = "5bd262af94e9d25bd1e71b05deed44876a222e8b";
+      };
+    }
+    {
+      name = "_nodelib_fs.walk___fs.walk_1.2.7.tgz";
+      path = fetchurl {
+        name = "_nodelib_fs.walk___fs.walk_1.2.7.tgz";
+        url  = "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz";
+        sha1 = "94c23db18ee4653e129abd26fb06f870ac9e1ee2";
+      };
+    }
     {
       name = "_sindresorhus_is___is_0.14.0.tgz";
       path = fetchurl {
@@ -433,6 +465,14 @@
         sha1 = "b1665e2c461a2cd92f4c1bbf50d5454de0d4b421";
       };
     }
+    {
+      name = "_types_auto_launch___auto_launch_5.0.1.tgz";
+      path = fetchurl {
+        name = "_types_auto_launch___auto_launch_5.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/@types/auto-launch/-/auto-launch-5.0.1.tgz";
+        sha1 = "388a047edc0e754d8e8978cbd9ed4672b36be2c4";
+      };
+    }
     {
       name = "_types_color_name___color_name_1.1.1.tgz";
       path = fetchurl {
@@ -441,6 +481,14 @@
         sha1 = "1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0";
       };
     }
+    {
+      name = "_types_counterpart___counterpart_0.18.1.tgz";
+      path = fetchurl {
+        name = "_types_counterpart___counterpart_0.18.1.tgz";
+        url  = "https://registry.yarnpkg.com/@types/counterpart/-/counterpart-0.18.1.tgz";
+        sha1 = "b1b784d9e54d9879f0a8cb12f2caedab65430fe8";
+      };
+    }
     {
       name = "_types_debug___debug_4.1.5.tgz";
       path = fetchurl {
@@ -465,6 +513,14 @@
         sha1 = "e6ba80f36b7daad2c685acd9266382e68985c183";
       };
     }
+    {
+      name = "_types_json_schema___json_schema_7.0.7.tgz";
+      path = fetchurl {
+        name = "_types_json_schema___json_schema_7.0.7.tgz";
+        url  = "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz";
+        sha1 = "98a993516c859eb0d5c4c8f098317a9ea68db9ad";
+      };
+    }
     {
       name = "_types_minimatch___minimatch_3.0.4.tgz";
       path = fetchurl {
@@ -473,6 +529,14 @@
         sha1 = "f0ec25dbf2f0e4b18647313ac031134ca5b24b21";
       };
     }
+    {
+      name = "_types_minimist___minimist_1.2.1.tgz";
+      path = fetchurl {
+        name = "_types_minimist___minimist_1.2.1.tgz";
+        url  = "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz";
+        sha1 = "283f669ff76d7b8260df8ab7a4262cc83d988256";
+      };
+    }
     {
       name = "_types_node___node_13.7.1.tgz";
       path = fetchurl {
@@ -489,6 +553,14 @@
         sha1 = "d934aacc22424fe9622ebf6857370c052eae464e";
       };
     }
+    {
+      name = "_types_node___node_14.17.4.tgz";
+      path = fetchurl {
+        name = "_types_node___node_14.17.4.tgz";
+        url  = "https://registry.yarnpkg.com/@types/node/-/node-14.17.4.tgz";
+        sha1 = "218712242446fc868d0e007af29a4408c7765bc0";
+      };
+    }
     {
       name = "_types_plist___plist_3.0.2.tgz";
       path = fetchurl {
@@ -521,6 +593,62 @@
         sha1 = "4b6d35bb8e680510a7dc2308518a80ee1ef27e01";
       };
     }
+    {
+      name = "_typescript_eslint_eslint_plugin___eslint_plugin_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_eslint_plugin___eslint_plugin_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.1.tgz";
+        sha1 = "c045e440196ae45464e08e20c38aff5c3a825947";
+      };
+    }
+    {
+      name = "_typescript_eslint_experimental_utils___experimental_utils_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_experimental_utils___experimental_utils_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.1.tgz";
+        sha1 = "3869489dcca3c18523c46018b8996e15948dbadc";
+      };
+    }
+    {
+      name = "_typescript_eslint_parser___parser_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_parser___parser_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.1.tgz";
+        sha1 = "5181b81658414f47291452c15bf6cd44a32f85bd";
+      };
+    }
+    {
+      name = "_typescript_eslint_scope_manager___scope_manager_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_scope_manager___scope_manager_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.1.tgz";
+        sha1 = "fd3c20627cdc12933f6d98b386940d8d0ce8a991";
+      };
+    }
+    {
+      name = "_typescript_eslint_types___types_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_types___types_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.1.tgz";
+        sha1 = "d0f2ecbef3684634db357b9bbfc97b94b828f83f";
+      };
+    }
+    {
+      name = "_typescript_eslint_typescript_estree___typescript_estree_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_typescript_estree___typescript_estree_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.1.tgz";
+        sha1 = "af882ae41740d1f268e38b4d0fad21e7e8d86a81";
+      };
+    }
+    {
+      name = "_typescript_eslint_visitor_keys___visitor_keys_4.28.1.tgz";
+      path = fetchurl {
+        name = "_typescript_eslint_visitor_keys___visitor_keys_4.28.1.tgz";
+        url  = "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.1.tgz";
+        sha1 = "162a515ee255f18a6068edc26df793cdc1ec9157";
+      };
+    }
     {
       name = "JSONStream___JSONStream_1.3.5.tgz";
       path = fetchurl {
@@ -729,6 +857,14 @@
         sha1 = "ae101a62bc08a597b4c9ab5b7089d456630549fe";
       };
     }
+    {
+      name = "anymatch___anymatch_3.1.2.tgz";
+      path = fetchurl {
+        name = "anymatch___anymatch_3.1.2.tgz";
+        url  = "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz";
+        sha1 = "c0557c096af32f106198f4f4e2a383537e378716";
+      };
+    }
     {
       name = "app_builder_bin___app_builder_bin_3.5.13.tgz";
       path = fetchurl {
@@ -817,6 +953,14 @@
         sha1 = "246f50f3ca78a3240f6c997e8a9bd1eac49e4b38";
       };
     }
+    {
+      name = "array_union___array_union_2.1.0.tgz";
+      path = fetchurl {
+        name = "array_union___array_union_2.1.0.tgz";
+        url  = "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz";
+        sha1 = "b798420adbeb1de828d84acd8a2e23d3efe85e8d";
+      };
+    }
     {
       name = "asap___asap_2.0.6.tgz";
       path = fetchurl {
@@ -985,6 +1129,14 @@
         sha1 = "bd39aadab5dc4bdac222a07df5baf1af745b2228";
       };
     }
+    {
+      name = "binary_extensions___binary_extensions_2.2.0.tgz";
+      path = fetchurl {
+        name = "binary_extensions___binary_extensions_2.2.0.tgz";
+        url  = "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz";
+        sha1 = "75f502eeaf9ffde42fc98829645be4ea76bd9e2d";
+      };
+    }
     {
       name = "bl___bl_4.0.3.tgz";
       path = fetchurl {
@@ -1017,6 +1169,14 @@
         sha1 = "e05a63f796a6c1ff25f4771ec7adadc148c07233";
       };
     }
+    {
+      name = "boolean___boolean_3.1.2.tgz";
+      path = fetchurl {
+        name = "boolean___boolean_3.1.2.tgz";
+        url  = "https://registry.yarnpkg.com/boolean/-/boolean-3.1.2.tgz";
+        sha1 = "e30f210a26b02458482a8cc353ab06f262a780c2";
+      };
+    }
     {
       name = "boxen___boxen_1.3.0.tgz";
       path = fetchurl {
@@ -1041,6 +1201,14 @@
         sha1 = "3c7fcbf529d87226f3d2f52b966ff5271eb441dd";
       };
     }
+    {
+      name = "braces___braces_3.0.2.tgz";
+      path = fetchurl {
+        name = "braces___braces_3.0.2.tgz";
+        url  = "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz";
+        sha1 = "3454e1a462ee8d599e236df336cd9ea4f8afe107";
+      };
+    }
     {
       name = "buffer_crc32___buffer_crc32_0.2.13.tgz";
       path = fetchurl {
@@ -1233,6 +1401,14 @@
         sha1 = "c80b3fab28bf6371e6863325eee67e618b77e6ad";
       };
     }
+    {
+      name = "chokidar___chokidar_3.5.2.tgz";
+      path = fetchurl {
+        name = "chokidar___chokidar_3.5.2.tgz";
+        url  = "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz";
+        sha1 = "dba3976fcadb016f66fd365021d91600d01c1e75";
+      };
+    }
     {
       name = "chownr___chownr_1.1.4.tgz";
       path = fetchurl {
@@ -1505,6 +1681,14 @@
         sha1 = "d9678a9d8f04de8bf5cd475105da8fdae49c2ec4";
       };
     }
+    {
+      name = "config_chain___config_chain_1.1.13.tgz";
+      path = fetchurl {
+        name = "config_chain___config_chain_1.1.13.tgz";
+        url  = "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz";
+        sha1 = "fad0795aa6a6cdaff9ed1b68e9dff94372c232f4";
+      };
+    }
     {
       name = "config_chain___config_chain_1.1.12.tgz";
       path = fetchurl {
@@ -1545,6 +1729,14 @@
         sha1 = "92297398cae34937fcafd6ec8139c18051f0b5e0";
       };
     }
+    {
+      name = "core_js___core_js_3.15.1.tgz";
+      path = fetchurl {
+        name = "core_js___core_js_3.15.1.tgz";
+        url  = "https://registry.yarnpkg.com/core-js/-/core-js-3.15.1.tgz";
+        sha1 = "6c08ab88abdf56545045ccf5fd81f47f407e7f1a";
+      };
+    }
     {
       name = "core_util_is___core_util_is_1.0.2.tgz";
       path = fetchurl {
@@ -1673,6 +1865,14 @@
         sha1 = "5bb5a0672628b64149566ba16819e61518c67261";
       };
     }
+    {
+      name = "debug___debug_2.6.9.tgz";
+      path = fetchurl {
+        name = "debug___debug_2.6.9.tgz";
+        url  = "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz";
+        sha1 = "5d128515df134ff327e90a4c93f4e077a536341f";
+      };
+    }
     {
       name = "debug___debug_3.2.7.tgz";
       path = fetchurl {
@@ -1825,6 +2025,14 @@
         sha1 = "f41f1c10be4b00e87b5f13da680759f2c5bfd3e2";
       };
     }
+    {
+      name = "detect_node___detect_node_2.1.0.tgz";
+      path = fetchurl {
+        name = "detect_node___detect_node_2.1.0.tgz";
+        url  = "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz";
+        sha1 = "c9c70775a49c3d03bc2c06d9a73be550f978f8b1";
+      };
+    }
     {
       name = "dezalgo___dezalgo_1.0.3.tgz";
       path = fetchurl {
@@ -1841,6 +2049,14 @@
         sha1 = "785c41dc5f645b34343a4eafc50b79bac7f11631";
       };
     }
+    {
+      name = "dir_glob___dir_glob_3.0.1.tgz";
+      path = fetchurl {
+        name = "dir_glob___dir_glob_3.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz";
+        sha1 = "56dbf73d992a4a93ba1584f4534063fd2e41717f";
+      };
+    }
     {
       name = "dmg_builder___dmg_builder_22.11.4.tgz";
       path = fetchurl {
@@ -2009,6 +2225,14 @@
         sha1 = "4f36d09e3f953d87aff103bf010f460056050aa8";
       };
     }
+    {
+      name = "electron___electron_12.0.11.tgz";
+      path = fetchurl {
+        name = "electron___electron_12.0.11.tgz";
+        url  = "https://registry.yarnpkg.com/electron/-/electron-12.0.11.tgz";
+        sha1 = "555dc1cf663e320f2f2cbdf89319352b08fc59f2";
+      };
+    }
     {
       name = "emoji_regex___emoji_regex_7.0.3.tgz";
       path = fetchurl {
@@ -2025,6 +2249,14 @@
         sha1 = "e818fd69ce5ccfcb404594f842963bf53164cc37";
       };
     }
+    {
+      name = "encodeurl___encodeurl_1.0.2.tgz";
+      path = fetchurl {
+        name = "encodeurl___encodeurl_1.0.2.tgz";
+        url  = "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz";
+        sha1 = "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59";
+      };
+    }
     {
       name = "encoding___encoding_0.1.13.tgz";
       path = fetchurl {
@@ -2097,6 +2329,14 @@
         sha1 = "e55cd4c9cdc188bcefb03b366c736323fc5c898a";
       };
     }
+    {
+      name = "es6_error___es6_error_4.1.1.tgz";
+      path = fetchurl {
+        name = "es6_error___es6_error_4.1.1.tgz";
+        url  = "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz";
+        sha1 = "9e3af407459deed47e9a91f9b885a84eb05c561d";
+      };
+    }
     {
       name = "es6_promise___es6_promise_4.2.8.tgz";
       path = fetchurl {
@@ -2137,6 +2377,14 @@
         sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
       };
     }
+    {
+      name = "escape_string_regexp___escape_string_regexp_4.0.0.tgz";
+      path = fetchurl {
+        name = "escape_string_regexp___escape_string_regexp_4.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz";
+        sha1 = "14ba83a5d373e3d311e5afca29cf5bfad965bf34";
+      };
+    }
     {
       name = "eslint_config_google___eslint_config_google_0.14.0.tgz";
       path = fetchurl {
@@ -2169,6 +2417,14 @@
         sha1 = "d2de5e03424e707dc10c74068ddedae708741b27";
       };
     }
+    {
+      name = "eslint_utils___eslint_utils_3.0.0.tgz";
+      path = fetchurl {
+        name = "eslint_utils___eslint_utils_3.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz";
+        sha1 = "8aebaface7345bb33559db0a1f13a1d2d48c3672";
+      };
+    }
     {
       name = "eslint_visitor_keys___eslint_visitor_keys_1.1.0.tgz";
       path = fetchurl {
@@ -2305,6 +2561,14 @@
         sha1 = "f8b1136b4071fbd8eb140aff858b1019ec2915fa";
       };
     }
+    {
+      name = "extract_zip___extract_zip_1.7.0.tgz";
+      path = fetchurl {
+        name = "extract_zip___extract_zip_1.7.0.tgz";
+        url  = "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz";
+        sha1 = "556cc3ae9df7f452c493a0cfb51cc30277940927";
+      };
+    }
     {
       name = "extsprintf___extsprintf_1.3.0.tgz";
       path = fetchurl {
@@ -2337,6 +2601,14 @@
         sha1 = "3a7d56b559d6cbc3eb512325244e619a65c6c525";
       };
     }
+    {
+      name = "fast_glob___fast_glob_3.2.6.tgz";
+      path = fetchurl {
+        name = "fast_glob___fast_glob_3.2.6.tgz";
+        url  = "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.6.tgz";
+        sha1 = "434dd9529845176ea049acc9343e8282765c6e1a";
+      };
+    }
     {
       name = "fast_json_stable_stringify___fast_json_stable_stringify_2.0.0.tgz";
       path = fetchurl {
@@ -2353,6 +2625,22 @@
         sha1 = "3d8a5c66883a16a30ca8643e851f19baa7797917";
       };
     }
+    {
+      name = "fastq___fastq_1.11.0.tgz";
+      path = fetchurl {
+        name = "fastq___fastq_1.11.0.tgz";
+        url  = "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz";
+        sha1 = "bb9fb955a07130a918eb63c1f5161cc32a5d0858";
+      };
+    }
+    {
+      name = "fd_slicer___fd_slicer_1.1.0.tgz";
+      path = fetchurl {
+        name = "fd_slicer___fd_slicer_1.1.0.tgz";
+        url  = "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz";
+        sha1 = "25c7c89cb1f9077f8891bbe61d8f390eae256f1e";
+      };
+    }
     {
       name = "figgy_pudding___figgy_pudding_3.5.2.tgz";
       path = fetchurl {
@@ -2385,6 +2673,14 @@
         sha1 = "f10d1a3ae86c1694808e8f20906f43d4c9132dbb";
       };
     }
+    {
+      name = "fill_range___fill_range_7.0.1.tgz";
+      path = fetchurl {
+        name = "fill_range___fill_range_7.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz";
+        sha1 = "1919a6a7c75fe38b2c7c77e5198535da9acdda40";
+      };
+    }
     {
       name = "find_npm_prefix___find_npm_prefix_1.0.2.tgz";
       path = fetchurl {
@@ -2553,6 +2849,14 @@
         sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
       };
     }
+    {
+      name = "fsevents___fsevents_2.3.2.tgz";
+      path = fetchurl {
+        name = "fsevents___fsevents_2.3.2.tgz";
+        url  = "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz";
+        sha1 = "8a526f78b8fdf4623b709e0b975c52c24c02fd1a";
+      };
+    }
     {
       name = "function_bind___function_bind_1.1.1.tgz";
       path = fetchurl {
@@ -2681,6 +2985,14 @@
         sha1 = "3b193e9233f01d42d0b3f78294bbeeb418f94a90";
       };
     }
+    {
+      name = "global_agent___global_agent_2.2.0.tgz";
+      path = fetchurl {
+        name = "global_agent___global_agent_2.2.0.tgz";
+        url  = "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz";
+        sha1 = "566331b0646e6bf79429a16877685c4a1fbf76dc";
+      };
+    }
     {
       name = "global_dirs___global_dirs_0.1.1.tgz";
       path = fetchurl {
@@ -2697,6 +3009,14 @@
         sha1 = "70a76fe84ea315ab37b1f5576cbde7d48ef72686";
       };
     }
+    {
+      name = "global_tunnel_ng___global_tunnel_ng_2.7.1.tgz";
+      path = fetchurl {
+        name = "global_tunnel_ng___global_tunnel_ng_2.7.1.tgz";
+        url  = "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz";
+        sha1 = "d03b5102dfde3a69914f5ee7d86761ca35d57d8f";
+      };
+    }
     {
       name = "global___global_4.3.2.tgz";
       path = fetchurl {
@@ -2721,6 +3041,22 @@
         sha1 = "a18813576a41b00a24a97e7f815918c2e19925f8";
       };
     }
+    {
+      name = "globalthis___globalthis_1.0.2.tgz";
+      path = fetchurl {
+        name = "globalthis___globalthis_1.0.2.tgz";
+        url  = "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz";
+        sha1 = "2a235d34f4d8036219f7e34929b5de9e18166b8b";
+      };
+    }
+    {
+      name = "globby___globby_11.0.4.tgz";
+      path = fetchurl {
+        name = "globby___globby_11.0.4.tgz";
+        url  = "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz";
+        sha1 = "2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5";
+      };
+    }
     {
       name = "got___got_6.7.1.tgz";
       path = fetchurl {
@@ -2977,6 +3313,14 @@
         sha1 = "750e3db5862087b4737ebac8207ffd1ef27b25fc";
       };
     }
+    {
+      name = "ignore___ignore_5.1.8.tgz";
+      path = fetchurl {
+        name = "ignore___ignore_5.1.8.tgz";
+        url  = "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz";
+        sha1 = "f150a8b50a34289b33e22f5889abd4d8016f0e57";
+      };
+    }
     {
       name = "image_q___image_q_1.1.1.tgz";
       path = fetchurl {
@@ -3113,6 +3457,14 @@
         sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
       };
     }
+    {
+      name = "is_binary_path___is_binary_path_2.1.0.tgz";
+      path = fetchurl {
+        name = "is_binary_path___is_binary_path_2.1.0.tgz";
+        url  = "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz";
+        sha1 = "ea1f7f3b80f064236e83470f86c09c254fb45b09";
+      };
+    }
     {
       name = "is_callable___is_callable_1.1.4.tgz";
       path = fetchurl {
@@ -3241,6 +3593,14 @@
         sha1 = "43e8d65cc56e1b67f8d47262cf667099193f45a8";
       };
     }
+    {
+      name = "is_number___is_number_7.0.0.tgz";
+      path = fetchurl {
+        name = "is_number___is_number_7.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz";
+        sha1 = "7535345b896734d5f80c4d06c50955527a14f12b";
+      };
+    }
     {
       name = "is_obj___is_obj_1.0.1.tgz";
       path = fetchurl {
@@ -3929,6 +4289,14 @@
         sha1 = "aa8387104f2687edca01c8687ee45013d02d19bd";
       };
     }
+    {
+      name = "matcher___matcher_3.0.0.tgz";
+      path = fetchurl {
+        name = "matcher___matcher_3.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz";
+        sha1 = "bd9060f4c5b70aa8041ccc6f80368760994f30ca";
+      };
+    }
     {
       name = "63f9119bc0bc304e83d4e8e22364caa7850e7671";
       path = fetchurl {
@@ -3953,6 +4321,22 @@
         sha1 = "5edd52b485ca1d900fe64895505399a0dfa45f76";
       };
     }
+    {
+      name = "merge2___merge2_1.4.1.tgz";
+      path = fetchurl {
+        name = "merge2___merge2_1.4.1.tgz";
+        url  = "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz";
+        sha1 = "4368892f885e907455a6fd7dc55c0c9d404990ae";
+      };
+    }
+    {
+      name = "micromatch___micromatch_4.0.4.tgz";
+      path = fetchurl {
+        name = "micromatch___micromatch_4.0.4.tgz";
+        url  = "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz";
+        sha1 = "896d519dfe9db25fce94ceb7a500919bf881ebf9";
+      };
+    }
     {
       name = "mime_db___mime_db_1.42.0.tgz";
       path = fetchurl {
@@ -4281,6 +4665,14 @@
         sha1 = "ded306c5b0bfc870a9e9faf823bc5f283e05ae11";
       };
     }
+    {
+      name = "npm_conf___npm_conf_1.1.3.tgz";
+      path = fetchurl {
+        name = "npm_conf___npm_conf_1.1.3.tgz";
+        url  = "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz";
+        sha1 = "256cc47bd0e218c259c4e9550bf413bc2192aff9";
+      };
+    }
     {
       name = "npm_install_checks___npm_install_checks_3.0.2.tgz";
       path = fetchurl {
@@ -4729,6 +5121,22 @@
         sha1 = "f012ccb8415b7096fc2daa1054c3d72389594c73";
       };
     }
+    {
+      name = "path_type___path_type_4.0.0.tgz";
+      path = fetchurl {
+        name = "path_type___path_type_4.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz";
+        sha1 = "84ed01c0a7ba380afe09d90a8c180dcd9d03043b";
+      };
+    }
+    {
+      name = "pend___pend_1.2.0.tgz";
+      path = fetchurl {
+        name = "pend___pend_1.2.0.tgz";
+        url  = "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz";
+        sha1 = "7a57eb550a6783f9115331fcf4663d5c8e007a50";
+      };
+    }
     {
       name = "performance_now___performance_now_2.1.0.tgz";
       path = fetchurl {
@@ -4745,6 +5153,14 @@
         sha1 = "f9b6ac10a035636fb65dfc576aaaa17b8743125c";
       };
     }
+    {
+      name = "picomatch___picomatch_2.3.0.tgz";
+      path = fetchurl {
+        name = "picomatch___picomatch_2.3.0.tgz";
+        url  = "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz";
+        sha1 = "f1f061de8f6a4bf022892e2d128234fb98302972";
+      };
+    }
     {
       name = "pify___pify_2.3.0.tgz";
       path = fetchurl {
@@ -5009,6 +5425,14 @@
         sha1 = "30b3505f6fca741d5ae541964d1b3ae9dc2a0de8";
       };
     }
+    {
+      name = "queue_microtask___queue_microtask_1.2.3.tgz";
+      path = fetchurl {
+        name = "queue_microtask___queue_microtask_1.2.3.tgz";
+        url  = "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz";
+        sha1 = "4929228bbc724dfac43e0efb058caf7b6cfb6243";
+      };
+    }
     {
       name = "qw___qw_1.0.1.tgz";
       path = fetchurl {
@@ -5129,6 +5553,14 @@
         sha1 = "8d45407b4f870a0dcaebc0e28670d18e74514309";
       };
     }
+    {
+      name = "readdirp___readdirp_3.6.0.tgz";
+      path = fetchurl {
+        name = "readdirp___readdirp_3.6.0.tgz";
+        url  = "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz";
+        sha1 = "74a370bd857116e245b29cc97340cd431a02a6c7";
+      };
+    }
     {
       name = "regenerator_runtime___regenerator_runtime_0.13.7.tgz";
       path = fetchurl {
@@ -5265,6 +5697,14 @@
         sha1 = "1b42a6266a21f07421d1b0b54b7dc167b01c013b";
       };
     }
+    {
+      name = "reusify___reusify_1.0.4.tgz";
+      path = fetchurl {
+        name = "reusify___reusify_1.0.4.tgz";
+        url  = "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz";
+        sha1 = "90da382b1e126efc02146e90845a88db12925d76";
+      };
+    }
     {
       name = "rimraf___rimraf_2.7.1.tgz";
       path = fetchurl {
@@ -5281,6 +5721,22 @@
         sha1 = "f1a5402ba6220ad52cc1282bac1ae3aa49fd061a";
       };
     }
+    {
+      name = "roarr___roarr_2.15.4.tgz";
+      path = fetchurl {
+        name = "roarr___roarr_2.15.4.tgz";
+        url  = "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz";
+        sha1 = "f5fe795b7b838ccfe35dc608e0282b9eba2e7afd";
+      };
+    }
+    {
+      name = "run_parallel___run_parallel_1.2.0.tgz";
+      path = fetchurl {
+        name = "run_parallel___run_parallel_1.2.0.tgz";
+        url  = "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz";
+        sha1 = "66d1368da7bdf921eb9d95bd1a9229e7f21a43ee";
+      };
+    }
     {
       name = "run_queue___run_queue_1.0.3.tgz";
       path = fetchurl {
@@ -5329,6 +5785,14 @@
         sha1 = "2816234e2378bddc4e5354fab5caa895df7100d9";
       };
     }
+    {
+      name = "semver_compare___semver_compare_1.0.0.tgz";
+      path = fetchurl {
+        name = "semver_compare___semver_compare_1.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz";
+        sha1 = "0dee216a1c941ab37e9efb1788f6afc5ff5537fc";
+      };
+    }
     {
       name = "semver_diff___semver_diff_2.1.0.tgz";
       path = fetchurl {
@@ -5385,6 +5849,14 @@
         sha1 = "0b621c879348d8998e4b0e4be94b3f12e6018ef7";
       };
     }
+    {
+      name = "serialize_error___serialize_error_7.0.1.tgz";
+      path = fetchurl {
+        name = "serialize_error___serialize_error_7.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz";
+        sha1 = "f1360b0447f61ffb483ec4157c737fab7d778e18";
+      };
+    }
     {
       name = "set_blocking___set_blocking_2.0.0.tgz";
       path = fetchurl {
@@ -5449,6 +5921,14 @@
         sha1 = "b5fdc08f1287ea1178628e415e25132b73646c6d";
       };
     }
+    {
+      name = "slash___slash_3.0.0.tgz";
+      path = fetchurl {
+        name = "slash___slash_3.0.0.tgz";
+        url  = "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz";
+        sha1 = "6539be870c165adbd5240220dbe361f1bc4d4634";
+      };
+    }
     {
       name = "slice_ansi___slice_ansi_1.0.0.tgz";
       path = fetchurl {
@@ -5793,6 +6273,14 @@
         sha1 = "3c531942e908c2697c0ec344858c286c7ca0a60a";
       };
     }
+    {
+      name = "sumchecker___sumchecker_3.0.1.tgz";
+      path = fetchurl {
+        name = "sumchecker___sumchecker_3.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz";
+        sha1 = "6377e996795abb0b6d348e9b3e1dfb24345a8e42";
+      };
+    }
     {
       name = "supports_color___supports_color_5.5.0.tgz";
       path = fetchurl {
@@ -5961,6 +6449,14 @@
         sha1 = "ce0aa0c2f3df6adf852efb404a783e77c0475771";
       };
     }
+    {
+      name = "to_regex_range___to_regex_range_5.0.1.tgz";
+      path = fetchurl {
+        name = "to_regex_range___to_regex_range_5.0.1.tgz";
+        url  = "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz";
+        sha1 = "1648c44aae7c8d988a326018ed72f5b4dd0392e4";
+      };
+    }
     {
       name = "tough_cookie___tough_cookie_2.4.3.tgz";
       path = fetchurl {
@@ -5985,6 +6481,22 @@
         sha1 = "405923909592d56f78a5818434b0b78489ca5f2b";
       };
     }
+    {
+      name = "tslib___tslib_1.14.1.tgz";
+      path = fetchurl {
+        name = "tslib___tslib_1.14.1.tgz";
+        url  = "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz";
+        sha1 = "cf2d38bdc34a134bcaf1091c41f6619e2f672d00";
+      };
+    }
+    {
+      name = "tsutils___tsutils_3.21.0.tgz";
+      path = fetchurl {
+        name = "tsutils___tsutils_3.21.0.tgz";
+        url  = "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz";
+        sha1 = "b48717d394cea6c1e096983eed58e9d61715b623";
+      };
+    }
     {
       name = "tunnel_agent___tunnel_agent_0.6.0.tgz";
       path = fetchurl {
@@ -5993,6 +6505,14 @@
         sha1 = "27a5dea06b36b04a0a9966774b290868f0fc40fd";
       };
     }
+    {
+      name = "tunnel___tunnel_0.0.6.tgz";
+      path = fetchurl {
+        name = "tunnel___tunnel_0.0.6.tgz";
+        url  = "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz";
+        sha1 = "72f1314b34a5b192db012324df2cc587ca47f92c";
+      };
+    }
     {
       name = "tweetnacl___tweetnacl_0.14.5.tgz";
       path = fetchurl {
@@ -6009,6 +6529,14 @@
         sha1 = "07b8203bfa7056c0657050e3ccd2c37730bab8f1";
       };
     }
+    {
+      name = "type_fest___type_fest_0.13.1.tgz";
+      path = fetchurl {
+        name = "type_fest___type_fest_0.13.1.tgz";
+        url  = "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz";
+        sha1 = "0172cb5bce80b0bd542ea348db50c7e21834d934";
+      };
+    }
     {
       name = "type_fest___type_fest_0.16.0.tgz";
       path = fetchurl {
@@ -6049,6 +6577,14 @@
         sha1 = "867ac74e3864187b1d3d47d996a78ec5c8830777";
       };
     }
+    {
+      name = "typescript___typescript_4.3.4.tgz";
+      path = fetchurl {
+        name = "typescript___typescript_4.3.4.tgz";
+        url  = "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz";
+        sha1 = "3f85b986945bcf31071decdd96cf8bfa65f9dcbc";
+      };
+    }
     {
       name = "uid_number___uid_number_0.0.6.tgz";
       path = fetchurl {
@@ -6609,6 +7145,14 @@
         sha1 = "6299a9055b1cefc969ff7e79c1d918dceb22c360";
       };
     }
+    {
+      name = "yauzl___yauzl_2.10.0.tgz";
+      path = fetchurl {
+        name = "yauzl___yauzl_2.10.0.tgz";
+        url  = "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz";
+        sha1 = "c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9";
+      };
+    }
     {
       name = "zip_stream___zip_stream_4.1.0.tgz";
       path = fetchurl {
diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
index f8f4d31d6ec1..18338fc07977 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
@@ -8,12 +8,12 @@
 
 let
   executableName = "element-desktop";
-  version = "1.7.31";
+  version = "1.7.33";
   src = fetchFromGitHub {
     owner = "vector-im";
     repo = "element-desktop";
     rev = "v${version}";
-    sha256 = "14vyqzf69g4n3i7qjm1pgq2kwym6cira0jwvirzdrwxkfsl0dsq6";
+    sha256 = "sha256-1JmuKyJt6Q80lLXXrFw+h6/0JzWcr0qMIU9mTO+K56I=";
   };
 in mkYarnPackage rec {
   name = "element-desktop-${version}";
@@ -24,6 +24,15 @@ in mkYarnPackage rec {
 
   nativeBuildInputs = [ makeWrapper ];
 
+  buildPhase = ''
+    runHook preBuild
+    export HOME=$(mktemp -d)
+    pushd deps/element-desktop/
+    npx tsc
+    popd
+    runHook postBuild
+  '';
+
   installPhase = ''
     # resources
     mkdir -p "$out/share/element"

From b856b195409121457e7c52ad8177dc73a15c423c Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Fri, 23 Jul 2021 19:07:52 +0200
Subject: [PATCH 3/3] element-desktop: try to fix localization issues

I know that the en_EN.json vs. en-us.json is a nasty hack, but I don't
really understand where this `en-us.json` is supposed to be coming from.
---
 .../networking/instant-messengers/element/element-desktop.nix  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
index 18338fc07977..a45ead37efb2 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
@@ -29,6 +29,8 @@ in mkYarnPackage rec {
     export HOME=$(mktemp -d)
     pushd deps/element-desktop/
     npx tsc
+    yarn run i18n
+    node ./scripts/copy-res.js
     popd
     runHook postBuild
   '';
@@ -41,6 +43,7 @@ in mkYarnPackage rec {
     cp -r './deps/element-desktop/res/img' "$out/share/element"
     rm "$out/share/element/electron/node_modules"
     cp -r './node_modules' "$out/share/element/electron"
+    cp $out/share/element/electron/lib/i18n/strings/en_EN.json $out/share/element/electron/lib/i18n/strings/en-us.json
 
     # icons
     for icon in $out/share/element/electron/build/icons/*.png; do