From 9e9cc366d054bfaa995787b82257b241c4d575d4 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 13 Jul 2019 00:55:23 +0200 Subject: [PATCH] riot-web: fallback to example config Since 1.2.2, specifying defaults seems to be required for the app to start. --- .../networking/instant-messengers/riot/riot-web.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix index 61a581e834c1..2d6c0df412a1 100644 --- a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix +++ b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix @@ -3,7 +3,6 @@ # Note for maintainers: # Versions of `riot-web` and `riot-desktop` should be kept in sync. -let configFile = writeText "riot-config.json" conf; in stdenv.mkDerivation rec { name= "riot-web-${version}"; version = "1.2.2"; @@ -13,10 +12,14 @@ stdenv.mkDerivation rec { sha256 = "19nb6gyjaijah068ika6hvk18hraivm71830i9cd4ssl6g5j4k8x"; }; - installPhase = '' + installPhase = let + configFile = if (conf != null) + then writeText "riot-config.json" conf + else "$out/config.sample.json"; + in '' mkdir -p $out/ cp -R . $out/ - ${lib.optionalString (conf != null) "ln -s ${configFile} $out/config.json"} + ln -s ${configFile} $out/config.json ''; meta = {