Skip to content

Commit 8429e36

Browse files
element-{web,desktop}: 1.12.3 -> 1.12.6 (#465374)
2 parents 0359105 + d1bc225 commit 8429e36

File tree

5 files changed

+27
-7
lines changed

5 files changed

+27
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"version" = "1.12.3";
2+
"version" = "1.12.6";
33
"hashes" = {
4-
"desktopSrcHash" = "sha256-4pv6KxcTocguJo7DlBO+/pi+n8JbTHWukMtagaGaDy8=";
5-
"desktopYarnHash" = "sha256-lQn5dAiC15O/2eaWfWJedFjBgmnglAlmAEOhz+in0DM=";
4+
"desktopSrcHash" = "sha256-3CuEFbota6MPVLPeHkXgtb0OmDW91w08+XVnT3mDHaI=";
5+
"desktopYarnHash" = "sha256-SPXbp+6zmwXD0uN4ByV6kIni+DGQT8evYMioH1NZJVU=";
66
};
77
}

pkgs/by-name/el/element-desktop/update.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ getHashes() {
5454
};
5555
}
5656
EOF
57+
58+
if [ "$variant" = "web" ]; then
59+
local shared_components_yarn_hash="$(fixupHash "$(prefetch-yarn-deps "$src_path/packages/shared-components/yarn.lock")")"
60+
sed -i "/^ \"webYarnHash/a \ \"webSharedComponentsYarnHash\" = \"$shared_components_yarn_hash\";" "$output"
61+
fi
5762
}
5863

5964
getHashes web ../element-web-unwrapped/element-web-pin.nix

pkgs/by-name/el/element-desktop/yarn.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ stdenvNoCC.mkDerivation {
4141

4242
outputHash = hash;
4343
outputHashMode = "recursive";
44+
outputHashAlgo = "sha256";
4445
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"version" = "1.12.3";
2+
"version" = "1.12.6";
33
"hashes" = {
4-
"webSrcHash" = "sha256-a/RrUzJU/pjyD36WmNIqjSTBn5cfUOGNSe/l6iGp/0A=";
5-
"webYarnHash" = "sha256-TXOehZRw5UIhGTnpR0KzvEizSW9Qk2VTr+cG/XstB+k=";
4+
"webSrcHash" = "sha256-MZohRkaPNoevaLmOb60OcebYJDd0sI3UaPEFMXh7y38=";
5+
"webYarnHash" = "sha256-3iV2XXphubxDG+FzbNC9cHY+gjSTssv6iQK9U7BLMp0=";
6+
"webSharedComponentsYarnHash" = "sha256-fwRasJ3iI+4DjqfNNpZ5CceEydJITUTeB7brhcmqOKk=";
67
};
78
}

pkgs/by-name/el/element-web-unwrapped/package.nix

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
let
1313
pinData = import ./element-web-pin.nix;
14-
inherit (pinData.hashes) webSrcHash webYarnHash;
14+
inherit (pinData.hashes) webSrcHash webYarnHash webSharedComponentsYarnHash;
1515
noPhoningHome = {
1616
disable_guests = true; # disable automatic guest account registration at matrix.org
1717
};
@@ -35,6 +35,13 @@ stdenv.mkDerivation (
3535
hash = webSrcHash;
3636
};
3737

38+
# https://github.com/element-hq/element-web/commit/e883b05206129857aa00ca726252e10a0eb05cf9
39+
# introduced a link: dependency that we need to fetch as well
40+
offlineCacheSharedComponents = fetchYarnDeps {
41+
yarnLock = finalAttrs.src + "/packages/shared-components/yarn.lock";
42+
sha256 = webSharedComponentsYarnHash;
43+
};
44+
3845
offlineCache = fetchYarnDeps {
3946
yarnLock = finalAttrs.src + "/yarn.lock";
4047
sha256 = webYarnHash;
@@ -50,6 +57,12 @@ stdenv.mkDerivation (
5057
runHook preBuild
5158
5259
export VERSION=${finalAttrs.version}
60+
61+
pushd packages/shared-components
62+
yarnOfflineCache=${finalAttrs.offlineCacheSharedComponents} yarnConfigHook
63+
popd
64+
yarn --offline --cwd packages/shared-components prepare
65+
5366
yarn --offline build:res
5467
yarn --offline build:module_system
5568
yarn --offline build:bundle

0 commit comments

Comments
 (0)