···101 lib = hoconLib;
102103 generate = name: value:
104- let
105- # TODO: remove in 24.11
106- # Backwards compatibility for generators in the following locations:
107- # - nixos/modules/services/networking/jibri/default.nix (__hocon_envvar)
108- # - nixos/modules/services/networking/jicofo.nix (__hocon_envvar, __hocon_unquoted_string)
109- # - nixos/modules/services/networking/jitsi-videobridge.nix (__hocon_envvar)
110- replaceOldIndicators = value:
111- if lib.isAttrs value then
112- (if value ? "__hocon_envvar"
113- then
114- lib.warn ''
115- Use of `__hocon_envvar` has been deprecated, and will
116- be removed in the future.
117-118- Please use `(pkgs.formats.hocon {}).lib.mkSubstitution` instead.
119- ''
120- (hoconLib.mkSubstitution value.__hocon_envvar)
121- else if value ? "__hocon_unquoted_string"
122- then
123- lib.warn ''
124- Use of `__hocon_unquoted_string` has been deprecated, and will
125- be removed in the future.
126-127- Please make use of the freeform options of
128- `(pkgs.formats.hocon {}).format` instead.
129- ''
130- {
131- value = value.__hocon_unquoted_string;
132- _type = "unquoted_string";
133- }
134- else lib.mapAttrs (_: replaceOldIndicators) value)
135- else if lib.isList value
136- then map replaceOldIndicators value
137- else value;
138-139- finalValue = replaceOldIndicators value;
140- in
141 callPackage
142 ({
143 stdenvNoCC
···151 dontUnpack = true;
152 preferLocalBuild = true;
153154- json = builtins.toJSON finalValue;
155 passAsFile = [ "json" ];
156157 strictDeps = true;