@@ -35,7 +35,10 @@ let
3535 ${optionalString (cfg.class != null) "class = ${cfg.class}"}
3636 memory = ${cfg.memory}
3737 storage_memory = ${cfg.storageMemory}
38+
39+ ${optionalString (lib.versionAtLeast cfg.package.version "6.1") ''
3840 trace_format = ${cfg.traceFormat}
41+ ''}
3942
4043 ${optionalString (cfg.tls != null) ''
4144 tls_plugin = ${pkg}/libexec/plugins/FDBLibTLS.so
@@ -327,6 +330,15 @@ in
327330 };
328331
329332 config = mkIf cfg.enable {
333+ assertions = [
334+ { assertion = lib.versionOlder cfg.package.version "6.1" -> cfg.traceFormat == "xml";
335+ message = ''
336+ Versions of FoundationDB before 6.1 do not support configurable trace formats (only XML is supported).
337+ This option has no effect for version '' + cfg.package.version + '', and enabling it is an error.
338+ '';
339+ }
340+ ];
341+
330342 environment.systemPackages = [ pkg ];
331343
332344 users.users = optionalAttrs (cfg.user == "foundationdb") (singleton