nixos/mediawiki: allow using default extensions
This commit is contained in:
parent
c09f2cce68
commit
9bbd1037ec
|
@ -29,7 +29,7 @@ let
|
||||||
'') cfg.skins)}
|
'') cfg.skins)}
|
||||||
|
|
||||||
${concatStringsSep "\n" (mapAttrsToList (k: v: ''
|
${concatStringsSep "\n" (mapAttrsToList (k: v: ''
|
||||||
ln -s ${v} $out/share/mediawiki/extensions/${k}
|
ln -s ${if v != null then v else "$src/share/mediawiki/extensions/${k}"} $out/share/mediawiki/extensions/${k}
|
||||||
'') cfg.extensions)}
|
'') cfg.extensions)}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -204,17 +204,28 @@ in
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrsOf types.path;
|
type = types.attrsOf types.path;
|
||||||
description = ''
|
description = ''
|
||||||
List of paths whose content is copied to the 'skins'
|
Attribute set of paths whose content is copied to the <filename>skins</filename>
|
||||||
subdirectory of the MediaWiki installation.
|
subdirectory of the MediaWiki installation in addition to the default skins.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extensions = mkOption {
|
extensions = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrsOf types.path;
|
type = types.attrsOf (types.nullOr types.path);
|
||||||
description = ''
|
description = ''
|
||||||
List of paths whose content is copied to the 'extensions'
|
Attribute set of paths whose content is copied to the <filename>extensions</filename>
|
||||||
subdirectory of the MediaWiki installation.
|
subdirectory of the MediaWiki installation and enabled in configuration.
|
||||||
|
|
||||||
|
Use <literal>null</literal> instead of path to enable extensions that are part of MediaWiki.
|
||||||
|
'';
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
Matomo = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
|
||||||
|
sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";
|
||||||
|
};
|
||||||
|
ParserFunctions = null;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,13 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
services.mediawiki.virtualHost.hostName = "localhost";
|
services.mediawiki.virtualHost.hostName = "localhost";
|
||||||
services.mediawiki.virtualHost.adminAddr = "root@example.com";
|
services.mediawiki.virtualHost.adminAddr = "root@example.com";
|
||||||
services.mediawiki.passwordFile = pkgs.writeText "password" "correcthorsebatterystaple";
|
services.mediawiki.passwordFile = pkgs.writeText "password" "correcthorsebatterystaple";
|
||||||
|
services.mediawiki.extensions = {
|
||||||
|
Matomo = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
|
||||||
|
sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";
|
||||||
|
};
|
||||||
|
ParserFunctions = null;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
|
Loading…
Reference in a new issue