requires about 5 GB of space. If you're hard-pressed on space, consider
installing element-desktop-bin instead.
-WARNING: this script's build dependency is nodejs24-bin which conflicts
-with nodejs.
export YARN_CACHE_FOLDER=$BASE_TMP_DIR/cache
export npm_config_cache=$YARN_CACHE_FOLDER
export npm_config_nodedir=/usr
+export COREPACK_HOME=$BASE_TMP_DIR/corepack
+export COREPACK_ENABLE_NETWORK=0
export XDG_CACHE_HOME=$BASE_TMP_DIR/electron-cache
export CARGO_HOME=$BASE_TMP_DIR/cargo
export CFLAGS="$SLKCFLAGS"
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
sed -i 's|yarn |yarn --offline |g' package.json
+
+corepack install --global --cache-only $COREPACK_HOME/yarn.tgz
+export PATH=$COREPACK_HOME/v1/yarn/$(corepack yarn --version)/bin:$PATH
+
yarn install --frozen-lockfile \
--ignore-engines \
--no-fund \
https://sbo.t-rg.ws/element-desktop-1.12.6-vendored-sources.tar.xz"
MD5SUM_x86_64="c36286cf87e80641db5b64e27602f512 \
fc2f5530b8afb857ca8980106365450e \
- 664fda8217864dab0633144c7118ee81"
-REQUIRES="sqlcipher yarn rust-opt nodejs24-bin"
+ 104d78c8a4503300306cd0aa48799196"
+REQUIRES="sqlcipher rust-opt nodejs24-bin"
MAINTAINER="Vladislav 'fsLeg' Borisov"
EMAIL="fsleg@t-rg.ws"
export npm_config_nodedir=/usr
export XDG_CACHE_HOME="$BASE_TMP_DIR/electron-cache"
export CARGO_HOME="$BASE_TMP_DIR/cargo"
+export COREPACK_HOME="$BASE_TMP_DIR/corepack"
mkdir -p "$YARN_YARN_OFFLINE_MIRROR"
# element-web
cd "element-web-$VERSION"
+
+# set up yarn
+corepack pack -o "$COREPACK_HOME/yarn.tgz"
+# when "properly" calling yarn through corepack, it fails to pick up
+# vendored tarballs, so we call it directly
+export PATH=$COREPACK_HOME/v1/yarn/$(corepack yarn --version)/bin:$PATH
+
# this `yarn install` is actually a two step process. the second step
# doesn't like wrap-ansi that was cached during the first step, however we
# aren't interested in cache, we are interested in vendor directory, so we
EOF
cd ../../../..
+corepack cache clean
+
# vendor everything
cd ..
tar cfJ "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar.xz" \
"$PRGNAM-$VERSION/vendor" \
"$PRGNAM-$VERSION/.hak" \
- "$PRGNAM-$VERSION/electron-cache"
+ "$PRGNAM-$VERSION/electron-cache" \
+ "$PRGNAM-$VERSION/corepack/yarn.tgz"
cd "$CWD"
rm -rv "$TMP"