···354354 </listitem>
355355 <listitem>
356356 <para>
357357+ The
358358+ <link linkend="opt-services.wordpress.sites._name_.plugins">services.wordpress.sites.<name>.plugins</link>
359359+ and
360360+ <link linkend="opt-services.wordpress.sites._name_.themes">services.wordpress.sites.<name>.themes</link>
361361+ options have been converted from sets to attribute sets to
362362+ allow for consumers to specify explicit install paths via
363363+ attribute name.
364364+ </para>
365365+ </listitem>
366366+ <listitem>
367367+ <para>
357368 In <literal>mastodon</literal> it is now necessary to specify
358369 location of file with <literal>PostgreSQL</literal> database
359370 password. In
+2
nixos/doc/manual/release-notes/rl-2305.section.md
···87878888- Qt 5.12 and 5.14 have been removed, as the corresponding branches have been EOL upstream for a long time. This affected under 10 packages in nixpkgs, largely unmaintained upstream as well, however, out-of-tree package expressions may need to be updated manually.
89899090+- The [services.wordpress.sites.<name>.plugins](#opt-services.wordpress.sites._name_.plugins) and [services.wordpress.sites.<name>.themes](#opt-services.wordpress.sites._name_.themes) options have been converted from sets to attribute sets to allow for consumers to specify explicit install paths via attribute name.
9191+9092- In `mastodon` it is now necessary to specify location of file with `PostgreSQL` database password. In `services.mastodon.database.passwordFile` parameter default value `/var/lib/mastodon/secrets/db-password` has been changed to `null`.
91939294- The `--target-host` and `--build-host` options of `nixos-rebuild` no longer treat the `localhost` value specially – to build on/deploy to local machine, omit the relevant flag.
+22-40
nixos/modules/services/web-apps/wordpress.nix
···3232 # Since hard linking directories is not allowed, copying is the next best thing.
33333434 # copy additional plugin(s), theme(s) and language(s)
3535- ${concatMapStringsSep "\n" (theme: "cp -r ${theme} $out/share/wordpress/wp-content/themes/${theme.name}") cfg.themes}
3636- ${concatMapStringsSep "\n" (plugin: "cp -r ${plugin} $out/share/wordpress/wp-content/plugins/${plugin.name}") cfg.plugins}
3535+ ${concatStringsSep "\n" (mapAttrsToList (name: theme: "cp -r ${theme} $out/share/wordpress/wp-content/themes/${name}") cfg.themes)}
3636+ ${concatStringsSep "\n" (mapAttrsToList (name: plugin: "cp -r ${plugin} $out/share/wordpress/wp-content/plugins/${name}") cfg.plugins)}
3737 ${concatMapStringsSep "\n" (language: "cp -r ${language} $out/share/wordpress/wp-content/languages/") cfg.languages}
3838 '';
3939 };
···130130 };
131131132132 plugins = mkOption {
133133- type = types.listOf types.path;
134134- default = [];
133133+ type = with types; coercedTo
134134+ (listOf path)
135135+ (l: warn "setting this option with a list is deprecated"
136136+ listToAttrs (map (p: nameValuePair (p.name or (throw "${p} does not have a name")) p) l))
137137+ (attrsOf path);
138138+ default = {};
135139 description = lib.mdDoc ''
136136- List of path(s) to respective plugin(s) which are copied from the 'plugins' directory.
140140+ Path(s) to respective plugin(s) which are copied from the 'plugins' directory.
137141138142 ::: {.note}
139143 These plugins need to be packaged before use, see example.
140144 :::
141145 '';
142146 example = literalExpression ''
143143- let
144144- # Wordpress plugin 'embed-pdf-viewer' installation example
145145- embedPdfViewerPlugin = pkgs.stdenv.mkDerivation {
146146- name = "embed-pdf-viewer-plugin";
147147- # Download the theme from the wordpress site
148148- src = pkgs.fetchurl {
149149- url = "https://downloads.wordpress.org/plugin/embed-pdf-viewer.2.0.3.zip";
150150- sha256 = "1rhba5h5fjlhy8p05zf0p14c9iagfh96y91r36ni0rmk6y891lyd";
151151- };
152152- # We need unzip to build this package
153153- nativeBuildInputs = [ pkgs.unzip ];
154154- # Installing simply means copying all files to the output directory
155155- installPhase = "mkdir -p $out; cp -R * $out/";
156156- };
157157- # And then pass this theme to the themes list like this:
158158- in [ embedPdfViewerPlugin ]
147147+ {
148148+ inherit (pkgs.wordpressPackages.plugins) embed-pdf-viewer-plugin;
149149+ }
159150 '';
160151 };
161152162153 themes = mkOption {
163163- type = types.listOf types.path;
164164- default = [];
154154+ type = with types; coercedTo
155155+ (listOf path)
156156+ (l: warn "setting this option with a list is deprecated"
157157+ listToAttrs (map (p: nameValuePair (p.name or (throw "${p} does not have a name")) p) l))
158158+ (attrsOf path);
159159+ default = {};
165160 description = lib.mdDoc ''
166166- List of path(s) to respective theme(s) which are copied from the 'theme' directory.
161161+ Path(s) to respective theme(s) which are copied from the 'theme' directory.
167162168163 ::: {.note}
169164 These themes need to be packaged before use, see example.
170165 :::
171166 '';
172167 example = literalExpression ''
173173- let
174174- # Let's package the responsive theme
175175- responsiveTheme = pkgs.stdenv.mkDerivation {
176176- name = "responsive-theme";
177177- # Download the theme from the wordpress site
178178- src = pkgs.fetchurl {
179179- url = "https://downloads.wordpress.org/theme/responsive.3.14.zip";
180180- sha256 = "0rjwm811f4aa4q43r77zxlpklyb85q08f9c8ns2akcarrvj5ydx3";
181181- };
182182- # We need unzip to build this package
183183- nativeBuildInputs = [ pkgs.unzip ];
184184- # Installing simply means copying all files to the output directory
185185- installPhase = "mkdir -p $out; cp -R * $out/";
186186- };
187187- # And then pass this theme to the themes list like this:
188188- in [ responsiveTheme ]
168168+ {
169169+ inherit (pkgs.wordpressPackages.themes) responsive-theme;
170170+ }
189171 '';
190172 };
191173