diff --git a/pkgs/applications/networking/instant-messengers/riot/riot-web.nix b/pkgs/applications/networking/instant-messengers/riot/riot-web.nix index 61a581e834c..2d6c0df412a 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 = {