uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,106 @@
|
|||
{ stdenv, lib
|
||||
, fetchFromGitHub
|
||||
, fetchYarnDeps
|
||||
, nodejs
|
||||
, yarn
|
||||
, fixup_yarn_lock
|
||||
, writeText, jq, conf ? {}
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
noPhoningHome = {
|
||||
disable_guests = true; # disable automatic guest account registration at matrix.org
|
||||
};
|
||||
configOverrides = writeText "element-config-overrides.json" (builtins.toJSON (noPhoningHome // conf));
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "schildichat-web";
|
||||
inherit (pinData) version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SchildiChat";
|
||||
repo = "schildichat-desktop";
|
||||
inherit (pinData) rev;
|
||||
sha256 = pinData.srcHash;
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
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 ];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME=$PWD/tmp
|
||||
mkdir -p $HOME
|
||||
|
||||
pushd element-web
|
||||
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
|
||||
ln -s $PWD/../matrix-react-sdk node_modules/
|
||||
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
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
pushd element-web
|
||||
node scripts/copy-res.js
|
||||
node_modules/.bin/webpack --progress --mode production
|
||||
popd
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mv element-web/webapp $out
|
||||
jq -s '.[0] * .[1]' "configs/sc/config.json" "${configOverrides}" > "$out/config.json"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Matrix client / Element Web fork";
|
||||
homepage = "https://schildi.chat/";
|
||||
changelog = "https://github.com/SchildiChat/schildichat-desktop/releases";
|
||||
maintainers = lib.teams.matrix.members ++ [ lib.maintainers.kloenk ];
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue