riot-web: fallback to example config

Since 1.2.2, specifying defaults seems to be required for the app to start.
This commit is contained in:
pacien 2019-07-13 00:55:23 +02:00
parent 3c84ac7523
commit 9e9cc366d0

View file

@ -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 = {