mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
discourse: Fix plugin support
For plugins to work properly, their assets need to be precompiled along with the rest of Discourse's assets. This means we need to build new packages when the list of plugins change.
This commit is contained in:
parent
7e567a3d09
commit
9af3672f4f
2 changed files with 9 additions and 3 deletions
|
@ -30,6 +30,9 @@ in
|
|||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.discourse;
|
||||
apply = p: p.override {
|
||||
plugins = lib.unique (p.enabledPlugins ++ cfg.plugins);
|
||||
};
|
||||
defaultText = "pkgs.discourse";
|
||||
description = ''
|
||||
The discourse package to use.
|
||||
|
@ -731,8 +734,6 @@ in
|
|||
|
||||
cp -r ${cfg.package}/share/discourse/config.dist/* /run/discourse/config/
|
||||
cp -r ${cfg.package}/share/discourse/public.dist/* /run/discourse/public/
|
||||
cp -r ${cfg.package}/share/discourse/plugins.dist/* /run/discourse/plugins/
|
||||
${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} /run/discourse/plugins/") cfg.plugins}
|
||||
ln -sf /var/lib/discourse/uploads /run/discourse/public/uploads
|
||||
ln -sf /var/lib/discourse/backups /run/discourse/public/backups
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue