diff options
| author | Nikolay Amiantov <ab@fmap.me> | 2020-04-12 20:25:35 +0300 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-01-09 06:53:58 +0000 |
| commit | 7e5fd25ce5e5a88fb0f1ab91541614e71b8823e4 (patch) | |
| tree | 302bf5ae203151b21699b38189b971673340d08d | |
| parent | uwsgi service: redefine PATH envvar (diff) | |
| download | nixpkgs-origin/backport-153589-to-release-21.11.tar.gz | |
uwsgi service: deduplicate plugins listorigin/backport-153589-to-release-21.11
Duplicates can lead to unnecessary `uwsgi` rebuilds and conflicts.
(cherry picked from commit 2be5e93ecca1e1ec03101ca91b949843bf691355)
| -rw-r--r-- | nixos/modules/services/web-servers/uwsgi.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix index 694636267d9c..77258626c239 100644 --- a/nixos/modules/services/web-servers/uwsgi.nix +++ b/nixos/modules/services/web-servers/uwsgi.nix @@ -20,10 +20,11 @@ let buildCfg = name: c: let - plugins = + plugins' = if any (n: !any (m: m == n) cfg.plugins) (c.plugins or []) then throw "`plugins` attribute in uWSGI configuration contains plugins not in config.services.uwsgi.plugins" else c.plugins or cfg.plugins; + plugins = unique plugins'; hasPython = v: filter (n: n == "python${v}") plugins != []; hasPython2 = hasPython "2"; @@ -222,7 +223,7 @@ in { }; services.uwsgi.package = pkgs.uwsgi.override { - inherit (cfg) plugins; + plugins = unique cfg.plugins; }; }; } |
