2020-02-17 15:54:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
|
2017-08-26 19:49:07 +01:00
|
|
|
|
2019-05-02 23:59:48 +01:00
|
|
|
# Note for maintainers:
|
|
|
|
# Versions of `riot-web` and `riot-desktop` should be kept in sync.
|
|
|
|
|
2020-02-17 15:54:13 +00:00
|
|
|
let
|
|
|
|
noPhoningHome = {
|
|
|
|
disable_guests = true; # disable automatic guest account registration at matrix.org
|
|
|
|
piwik = false; # disable analytics
|
|
|
|
};
|
|
|
|
configOverrides = writeText "riot-config-overrides.json" (builtins.toJSON (noPhoningHome // conf));
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "riot-web";
|
2020-05-05 13:27:31 +01:00
|
|
|
version = "1.6.0";
|
2017-08-26 19:49:07 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
2020-05-05 13:27:31 +01:00
|
|
|
sha256 = "1mm4xk69ya1k3gz6jjhc4njx7b3rp157jmrqsxr5i382zs035ff7";
|
2017-08-26 19:49:07 +01:00
|
|
|
};
|
|
|
|
|
2020-02-17 15:54:13 +00:00
|
|
|
installPhase = ''
|
2019-12-10 14:54:05 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2017-08-26 19:49:07 +01:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2020-02-17 15:54:13 +00:00
|
|
|
${jq}/bin/jq -s '.[0] * .[1]' "config.sample.json" "${configOverrides}" > "$out/config.json"
|
2019-12-10 14:54:05 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-08-26 19:49:07 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A glossy Matrix collaboration client for the web";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://riot.im/";
|
2020-02-20 01:50:23 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ bachp pacien ma27 ];
|
2017-08-26 19:49:07 +01:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|