summaryrefslogtreecommitdiffstats
path: root/tv/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-10-08 23:12:57 +0200
committertv <tv@krebsco.de>2022-10-08 23:29:23 +0200
commitc90672185504751397359cca0eb44f292571e225 (patch)
treeb539da7c66c351556f8055ebf1793db3ffc9898e /tv/3modules
parentb2c66d60cc2e50d2e3729afb2d0aca2dbdb9c7d5 (diff)
tv ejabberd: change YAML formatting style
Diffstat (limited to 'tv/3modules')
-rw-r--r--tv/3modules/ejabberd/default.nix27
1 files changed, 26 insertions, 1 deletions
diff --git a/tv/3modules/ejabberd/default.nix b/tv/3modules/ejabberd/default.nix
index 2966a4f..2a87b59 100644
--- a/tv/3modules/ejabberd/default.nix
+++ b/tv/3modules/ejabberd/default.nix
@@ -25,7 +25,32 @@ in {
};
configFile = mkOption {
type = types.either types.package types.absolute-pathname;
- default = settingsFormat.generate "ejabberd.yaml" cfg.settings;
+ default =
+ (settingsFormat.generate "ejabberd.yaml" cfg.settings)
+ # XXX ejabberd cannot parse MQTT topic filters enclosed in single
+ # quotes. By changing the YAML formatting style, double quotes will
+ # be used instead.
+ #
+ # Related error message:
+ # Invalid value of option modules->mod_mqtt->access_publish:
+ # Malformed topic filter
+ #
+ .overrideAttrs (old: {
+ nativeBuildInputs =
+ filter
+ (pkg: (parseDrvName pkg.name).name != "remarshal")
+ old.nativeBuildInputs
+ ++
+ singleton (pkgs.symlinkJoin {
+ name = "remarshal";
+ paths = [
+ (pkgs.writeDashBin "json2yaml" ''
+ exec ${pkgs.remarshal}/bin/json2yaml --yaml-style \> "$@"
+ '')
+ pkgs.remarshal
+ ];
+ });
+ });
};
ciphers = mkOption {
type = types.listOf types.str;