about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/default.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2024-02-28 16:29:27 +0100
committerRobert Hensing <robert@roberthensing.nl>2024-03-06 22:47:23 +0100
commit8d9f5ca31a0315c99584dc3d0d642354ca1c67aa (patch)
treeae5fdf336cf9b837c3a3dc6556bee2d8e5ff1af6 /pkgs/applications/networking/cluster/nixops/default.nix
parent663b3d4be79ebb31ab277a55c0fe4b975cfa17c2 (diff)
nixops_unstable_*: Memoize availablePlugins
Diffstat (limited to 'pkgs/applications/networking/cluster/nixops/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/nixops/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/default.nix b/pkgs/applications/networking/cluster/nixops/default.nix
index 6bdbebb8eb6d1..abaa62a8bfdbf 100644
--- a/pkgs/applications/networking/cluster/nixops/default.nix
+++ b/pkgs/applications/networking/cluster/nixops/default.nix
@@ -25,10 +25,12 @@ let
     nixopsvbox = nixops-vbox;
   };
 
+  withPlugins = withPlugins' { availablePlugins = plugins python.pkgs; };
+
   # selector is a function mapping pythonPackages to a list of plugins
   # e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-aws ])
-  withPlugins = selector: let
-   selected = selector (plugins python.pkgs);
+  withPlugins' = { availablePlugins }: selector: let
+   selected = selector availablePlugins;
    r = python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: {
     propagatedBuildInputs = old.propagatedBuildInputs ++ selected;
 
@@ -39,7 +41,7 @@ let
     '';
 
     passthru = old.passthru // {
-      plugins = plugins python.pkgs;
+      plugins = availablePlugins;
       inherit withPlugins python;
       tests = old.passthru.tests // {
         nixos = old.passthru.tests.nixos.passthru.override {