Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5c32423330fe
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fadb703ae845
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 1, 2020

  1. riot-web: accept conf override as attrset and str

    f18d4e3 changed the type from str to attrset, which broke some people's config.
    
    GitHub: closes #81416
    pacien committed Mar 1, 2020
    Copy the full SHA
    ad55e6e View commit details
  2. Merge pull request #81470 from pacien/riot-web-conf-attr-str-19.09

    [19.09] riot-web: accept conf override as attrset and str
    rnhmjoj authored Mar 1, 2020
    Copy the full SHA
    fadb703 View commit details
Showing with 11 additions and 4 deletions.
  1. +11 −4 pkgs/applications/networking/instant-messengers/riot/riot-web.nix
15 changes: 11 additions & 4 deletions pkgs/applications/networking/instant-messengers/riot/riot-web.nix
Original file line number Diff line number Diff line change
@@ -4,11 +4,13 @@
# Versions of `riot-web` and `riot-desktop` should be kept in sync.

let
noPhoningHome = {
privacyOverrides = writeText "riot-config-privacy.json" (builtins.toJSON {
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));
});
userOverrides = writeText "riot-config-user.json" (
with builtins; if isAttrs conf then toJSON conf else conf
);

in stdenv.mkDerivation rec {
pname = "riot-web";
@@ -24,7 +26,12 @@ in stdenv.mkDerivation rec {
mkdir -p $out/
cp -R . $out/
${jq}/bin/jq -s '.[0] * .[1]' "config.sample.json" "${configOverrides}" > "$out/config.json"
${jq}/bin/jq -s '.[0] * .[1] * .[2]' \
"config.sample.json" \
"${privacyOverrides}" \
"${userOverrides}" \
> "$out/config.json"
runHook postInstall
'';