mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nixos/grafana: Filter out duplicate plugins
If the same plugin appears multiple times in `declarativePlugins`, for example due to being added both by a module and in user config, the build fails with an error message similar to ln: failed to create symbolic link 'grafana-worldmap-panel/glmqcj88zk2bz3mvdr3r7920wxg02qnq-grafana-worldmap-panel-0.3.2': Permission denied This is solved by removing all duplicates.
This commit is contained in:
parent
6d84e50b19
commit
98f07d6cc5
1 changed files with 5 additions and 0 deletions
|
@ -337,11 +337,16 @@ in {
|
|||
defaultText = "pkgs.grafana";
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
declarativePlugins = mkOption {
|
||||
type = with types; nullOr (listOf path);
|
||||
default = null;
|
||||
description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
|
||||
example = literalExample "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
|
||||
# Make sure each plugin is added only once; otherwise building
|
||||
# the link farm fails, since the same path is added multiple
|
||||
# times.
|
||||
apply = x: if isList x then lib.unique x else x;
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
|
|
Loading…
Reference in a new issue