mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 13:13:33 +00:00
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
|
|
|
|
# Note for maintainers:
|
|
# Versions of `riot-web` and `riot-desktop` should be kept in sync.
|
|
|
|
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 {
|
|
pname = "riot-web";
|
|
version = "1.6.7";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
|
sha256 = "14g5rbvcw6p0q50slbf0c7s39i54ggv2cjc5iv93yvfrwn3z0f8p";
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/
|
|
cp -R . $out/
|
|
${jq}/bin/jq -s '.[0] * .[1]' "config.sample.json" "${configOverrides}" > "$out/config.json"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "A glossy Matrix collaboration client for the web";
|
|
homepage = "http://riot.im/";
|
|
maintainers = stdenv.lib.teams.matrix.members;
|
|
license = stdenv.lib.licenses.asl20;
|
|
platforms = stdenv.lib.platforms.all;
|
|
hydraPlatforms = [];
|
|
};
|
|
}
|