diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix b/pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix index c3860c9f05c..a7ad6fb4d9b 100644 --- a/pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix +++ b/pkgs/applications/networking/instant-messengers/schildichat/schildichat-web.nix @@ -1,5 +1,5 @@ { stdenv, lib -, fetchgit +, fetchFromGitHub , fetchYarnDeps , nodejs , yarn @@ -18,17 +18,26 @@ in stdenv.mkDerivation rec { pname = "schildichat-web"; inherit (pinData) version; - src = fetchgit { - url = "https://github.com/SchildiChat/schildichat-desktop/"; + src = fetchFromGitHub { + owner = "SchildiChat"; + repo = "schildichat-desktop"; inherit (pinData) rev; sha256 = pinData.srcHash; fetchSubmodules = true; }; - offlineCache = fetchYarnDeps { + webOfflineCache = fetchYarnDeps { yarnLock = src + "/element-web/yarn.lock"; sha256 = pinData.webYarnHash; }; + jsSdkOfflineCache = fetchYarnDeps { + yarnLock = src + "/matrix-js-sdk/yarn.lock"; + sha256 = pinData.jsSdkYarnHash; + }; + reactSdkOfflineCache = fetchYarnDeps { + yarnLock = src + "/matrix-react-sdk/yarn.lock"; + sha256 = pinData.reactSdkYarnHash; + }; nativeBuildInputs = [ yarn fixup_yarn_lock jq nodejs ]; @@ -37,14 +46,30 @@ in stdenv.mkDerivation rec { export HOME=$PWD/tmp mkdir -p $HOME + pushd element-web - yarn config --offline set yarn-offline-mirror $offlineCache fixup_yarn_lock yarn.lock + yarn config --offline set yarn-offline-mirror $webOfflineCache yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules rm -rf node_modules/matrix-react-sdk - patchShebangs node_modules/ ../matrix-react-sdk/scripts/ ln -s $PWD/../matrix-react-sdk node_modules/ - ln -s $PWD/node_modules ../matrix-react-sdk/ + rm -rf node_modules/matrix-js-sdk + ln -s $PWD/../matrix-js-sdk node_modules/ + popd + + pushd matrix-js-sdk + fixup_yarn_lock yarn.lock + yarn config --offline set yarn-offline-mirror $jsSdkOfflineCache + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules + popd + + pushd matrix-react-sdk + fixup_yarn_lock yarn.lock + yarn config --offline set yarn-offline-mirror $reactSdkOfflineCache + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules scripts popd runHook postConfigure @@ -54,7 +79,7 @@ in stdenv.mkDerivation rec { runHook preBuild pushd matrix-react-sdk - node_modules/.bin/reskindex -h ../element-web/src/header + ../element-web/node_modules/.bin/reskindex -h ../element-web/src/header popd pushd element-web |