···101101 lib = hoconLib;
102102103103 generate = name: value:
104104- let
105105- # TODO: remove in 24.11
106106- # Backwards compatibility for generators in the following locations:
107107- # - nixos/modules/services/networking/jibri/default.nix (__hocon_envvar)
108108- # - nixos/modules/services/networking/jicofo.nix (__hocon_envvar, __hocon_unquoted_string)
109109- # - nixos/modules/services/networking/jitsi-videobridge.nix (__hocon_envvar)
110110- replaceOldIndicators = value:
111111- if lib.isAttrs value then
112112- (if value ? "__hocon_envvar"
113113- then
114114- lib.warn ''
115115- Use of `__hocon_envvar` has been deprecated, and will
116116- be removed in the future.
117117-118118- Please use `(pkgs.formats.hocon {}).lib.mkSubstitution` instead.
119119- ''
120120- (hoconLib.mkSubstitution value.__hocon_envvar)
121121- else if value ? "__hocon_unquoted_string"
122122- then
123123- lib.warn ''
124124- Use of `__hocon_unquoted_string` has been deprecated, and will
125125- be removed in the future.
126126-127127- Please make use of the freeform options of
128128- `(pkgs.formats.hocon {}).format` instead.
129129- ''
130130- {
131131- value = value.__hocon_unquoted_string;
132132- _type = "unquoted_string";
133133- }
134134- else lib.mapAttrs (_: replaceOldIndicators) value)
135135- else if lib.isList value
136136- then map replaceOldIndicators value
137137- else value;
138138-139139- finalValue = replaceOldIndicators value;
140140- in
141104 callPackage
142105 ({
143106 stdenvNoCC
···151114 dontUnpack = true;
152115 preferLocalBuild = true;
153116154154- json = builtins.toJSON finalValue;
117117+ json = builtins.toJSON value;
155118 passAsFile = [ "json" ];
156119157120 strictDeps = true;