3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix
Maximilian Bosch 0d5608d9b5
element-web: 1.7.14 -> 1.7.15
ChangeLog: https://github.com/vector-im/element-web/releases/tag/v1.7.15

Also had to replace `riot` with `element` in the download URL now as the
artifacts were renamed in this release.
2020-12-09 12:27:03 +01:00

41 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
# Note for maintainers:
# Versions of `element-web` and `element-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 "element-config-overrides.json" (builtins.toJSON (noPhoningHome // conf));
in stdenv.mkDerivation rec {
pname = "element-web";
version = "1.7.15";
src = fetchurl {
url = "https://github.com/vector-im/element-web/releases/download/v${version}/element-v${version}.tar.gz";
sha256 = "sha256-ZSi0OLA5dyPXn1NlZkkhCmWhrSryfyj/O6Ux1lO12ns=";
};
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 = "https://element.io/";
maintainers = stdenv.lib.teams.matrix.members;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.all;
hydraPlatforms = [];
};
}