about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2022-10-31 10:02:04 +0100
committerGitHub <noreply@github.com>2022-10-31 10:02:04 +0100
commitabb54cd2b8e251f733e0c84ba5a6817208139918 (patch)
tree93dd00aed043762df119d1132f261b67ab753807 /pkgs/applications/networking
parentf46e05bb01c406105d78471e33a07d953443d56c (diff)
parent6e49dfc7549d3d93f5538cfe776df647bbb01b3f (diff)
Merge pull request #198146 from Ma27/bump-element
element-{web,desktop}: 1.11.10 -> 1.11.12
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/instant-messengers/element/element-web.nix14
-rw-r--r--pkgs/applications/networking/instant-messengers/element/pin.json10
-rw-r--r--pkgs/applications/networking/instant-messengers/element/regenerate-element-web-yarn.lock.diff32
-rwxr-xr-xpkgs/applications/networking/instant-messengers/element/update.sh3
4 files changed, 49 insertions, 10 deletions
diff --git a/pkgs/applications/networking/instant-messengers/element/element-web.nix b/pkgs/applications/networking/instant-messengers/element/element-web.nix
index 92130d3099020..3b30abbb3d6c8 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-web.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-web.nix
@@ -9,6 +9,7 @@
 , fixup_yarn_lock
 , nodejs
 , jitsi-meet
+, applyPatches
 , conf ? { }
 }:
 
@@ -24,11 +25,14 @@ in stdenv.mkDerivation rec {
   pname = "element-web";
   inherit (pinData) version;
 
-  src = fetchFromGitHub {
-    owner = "vector-im";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = pinData.webSrcHash;
+  src = applyPatches {
+    src = fetchFromGitHub {
+      owner = "vector-im";
+      repo = pname;
+      rev = "v${version}";
+      sha256 = pinData.webSrcHash;
+    };
+    patches = [ ./regenerate-element-web-yarn.lock.diff ];
   };
 
   offlineCache = fetchYarnDeps {
diff --git a/pkgs/applications/networking/instant-messengers/element/pin.json b/pkgs/applications/networking/instant-messengers/element/pin.json
index f5f38124ceb61..2ba1fbaf4f8e5 100644
--- a/pkgs/applications/networking/instant-messengers/element/pin.json
+++ b/pkgs/applications/networking/instant-messengers/element/pin.json
@@ -1,7 +1,7 @@
 {
-  "version": "1.11.10",
-  "desktopSrcHash": "cywTZ5OgKaFkHh3i3KLfb8HH8ZlIAOY3Xn2WHyY0fNM=",
-  "desktopYarnHash": "1xwnw9hbbrr72xs2d43qwhbmhfk3w4z80cipyrmdj5y248y8sz84",
-  "webSrcHash": "r7WZUWgPDEBS9xpc1YmmPVGch7B2ouJOFAoKdcC/55Q=",
-  "webYarnHash": "0s8wxf13jc9x4zykhm4abgq3a38mjya7z43kjsags1fxhilf09bc"
+  "version": "1.11.12",
+  "desktopSrcHash": "85mH9y3/IlThrdZY4Nv6iZQ8SxVGoYcZ1bbkCuAAroU=",
+  "desktopYarnHash": "1scp9y2lmah3n20f1kpc9paspd3qgslg129diis7g11cz4h0wyi5",
+  "webSrcHash": "MfiPrTw7BFLFPbm6xR5QbQHNPYpaJBtZES6KjISMTeE=",
+  "webYarnHash": "sha256-KZNBocVEs3wD5020h6C4n2jgp4shv4IgFENSi87rUFM="
 }
diff --git a/pkgs/applications/networking/instant-messengers/element/regenerate-element-web-yarn.lock.diff b/pkgs/applications/networking/instant-messengers/element/regenerate-element-web-yarn.lock.diff
new file mode 100644
index 0000000000000..98a39f9924707
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/element/regenerate-element-web-yarn.lock.diff
@@ -0,0 +1,32 @@
+diff --git a/yarn.lock b/yarn.lock
+index 1581f599f..910764c86 100644
+--- a/yarn.lock
++++ b/yarn.lock
+@@ -3150,6 +3150,11 @@ brorand@^1.0.1, brorand@^1.1.0:
+   resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
+   integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==
+ 
++browser-request@^0.3.3:
++  version "0.3.3"
++  resolved "https://registry.yarnpkg.com/browser-request/-/browser-request-0.3.3.tgz#9ece5b5aca89a29932242e18bf933def9876cc17"
++  integrity sha512-YyNI4qJJ+piQG6MMEuo7J3Bzaqssufx04zpEKYfSrl/1Op59HWali9zMtBpXnkmqMcOuWJPZvudrm9wISmnCbg==
++
+ browserify-aes@^1.0.0, browserify-aes@^1.0.4:
+   version "1.2.0"
+   resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
+@@ -8177,7 +8182,6 @@ matrix-js-sdk@21.0.0:
+   dependencies:
+     "@babel/runtime" "^7.12.5"
+     another-json "^0.2.0"
+-    browser-request "^0.3.3"
+     bs58 "^5.0.0"
+     content-type "^1.0.4"
+     loglevel "^1.7.1"
+@@ -8208,7 +8212,6 @@ matrix-react-sdk@3.59.0:
+     "@types/ua-parser-js" "^0.7.36"
+     await-lock "^2.1.0"
+     blurhash "^1.1.3"
+-    browser-request "^0.3.3"
+     cheerio "^1.0.0-rc.9"
+     classnames "^2.2.6"
+     commonmark "^0.29.3"
diff --git a/pkgs/applications/networking/instant-messengers/element/update.sh b/pkgs/applications/networking/instant-messengers/element/update.sh
index 976b6cb0ba8fc..b02e1d022393e 100755
--- a/pkgs/applications/networking/instant-messengers/element/update.sh
+++ b/pkgs/applications/networking/instant-messengers/element/update.sh
@@ -1,6 +1,9 @@
 #!/usr/bin/env nix-shell
 #!nix-shell -I nixpkgs=../../../../../ -i bash -p nix wget prefetch-yarn-deps nix-prefetch-github
 
+# FIXME should fix itself on the next release -> remove the warning if that's the case
+echo "WARNING: on the last update, the yarn.lock had to be patched. Please be careful when updating the hashes!"
+
 if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
   echo "Regenerates packaging data for the element packages."
   echo "Usage: $0 [git release tag]"