Merge pull request #64687 from pacien/riot-web-config-fix

riot-web: fallback to example config
This commit is contained in:
worldofpeace 2019-07-13 11:14:16 -04:00 committed by GitHub
commit 0394aae7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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