Unverified Commit caf3f8bb authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

element-{web,desktop}: use yarnConfigHook (#387319)

parents 4adce1da 15fd40ac
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
@@ -4,8 +4,7 @@
  fetchFromGitHub,
  makeWrapper,
  makeDesktopItem,
  fixup-yarn-lock,
  yarn,
  yarnConfigHook,
  nodejs,
  fetchYarnDeps,
  jq,
@@ -48,8 +47,7 @@ stdenv.mkDerivation (
    };

    nativeBuildInputs = [
      yarn
      fixup-yarn-lock
      yarnConfigHook
      nodejs
      makeWrapper
      jq
@@ -57,18 +55,6 @@ stdenv.mkDerivation (

    inherit seshat;

    configurePhase = ''
      runHook preConfigure

      export HOME=$(mktemp -d)
      yarn config --offline set yarn-offline-mirror $offlineCache
      fixup-yarn-lock yarn.lock
      yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
      patchShebangs node_modules/

      runHook postConfigure
    '';

    # Only affects unused scripts in $out/share/element/electron/scripts. Also
    # breaks because there are some `node`-scripts with a `npx`-shebang and
    # this shouldn't be in the closure just for unused scripts.
+2 −23
Original line number Diff line number Diff line
@@ -4,8 +4,7 @@
  fetchFromGitHub,
  fetchYarnDeps,
  jq,
  yarn,
  fixup-yarn-lock,
  yarnConfigHook,
  nodejs,
  jitsi-meet,
}:
@@ -36,8 +35,7 @@ stdenv.mkDerivation (
    };

    nativeBuildInputs = [
      yarn
      fixup-yarn-lock
      yarnConfigHook
      jq
      nodejs
    ];
@@ -53,25 +51,6 @@ stdenv.mkDerivation (
      runHook postBuild
    '';

    configurePhase = ''
      runHook preConfigure

      export HOME=$PWD/tmp
      # with the update of openssl3, some key ciphers are not supported anymore
      # this flag will allow those codecs again as a workaround
      # see https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382#5f07
      # and https://github.com/element-hq/element-web/issues/21043
      export NODE_OPTIONS=--openssl-legacy-provider
      mkdir -p $HOME

      fixup-yarn-lock yarn.lock
      yarn config --offline set yarn-offline-mirror $offlineCache
      yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
      patchShebangs node_modules

      runHook postConfigure
    '';

    installPhase = ''
      runHook preInstall